Returns or sets a String that represents the domain name of the current document. The domain represents the name of the server on which the document is located or the Web address with which it is associated. Read/write.
expression.domain
expression Required. An expression that returns a dispFPHTMLDocument object.
The following example displays the domain name for the current document if a domain name exists. If the document's domain property is empty, a message is displayed to the user.
Sub DomainName()
'Displays the domain name for the current document
Dim objApp As FrontPage.Application
Dim objDoc As DispFPHTMLDocument
Dim strAns As String
Set objApp = FrontPage.Application
Set objDoc = objApp.ActiveDocument
'If domain name exists
If objDoc.domain <> "" Then
MsgBox "The name of the current document's domain server is " & _
objDoc.domain & "."
Else
'Otherwise, display message to user
MsgBox "The document " & objDoc.Title & _
" does not have an associated domain name."
End If
End Sub