返回 String 类型的值,该值代表当前文档的协议。protocol 属性返回协议子字符串,该字符串截止到第一个冒号并包含第一个冒号,表示 URL 的访问方法。只读。
expression.protocol
expression 必选。返回 DispFPHTMLDocument 对象的表达式。
下列示例显示用于访问活动文档的协议类型。
Sub ProtocolType()
'Returns the protocol type used by the active document
Dim objApp As FrontPage.Application
Dim objDoc As DispFPHTMLDocument
Set objApp = FrontPage.Application
Set objDoc = objApp.ActiveDocument
'Display protocol type
MsgBox "The current document's protocol type is :" & objDoc.protocol
End Sub