host Property
Returns a String that represents the hostname and port properties for the location or URL.
expression.host
*expression * Required. An expression that returns one of the objects in the Applies To list.
Example
The following example displays a message if the active document contains more than one hyperlink to the same page.
Dim objLink As FPHTMLAnchorElement
Dim objLoop As FPHTMLAnchorElement
Dim blnMultiple As Boolean
Dim strLink As String
Dim intCount As Integer
For Each objLink In ActiveDocument.Links
strLink = objLink.host
For Each objLoop In ActiveDocument.Links
If objLink.host = strLink Then
If intCount > 0 Then
MsgBox "Your document contains multiple " & _
"hyperlinks to the same page."
blnMultiple = True
Exit For
End If
intCount = intCount + 1
End If
Next
If blnMultiple = True Then Exit For
Next
Applies to | FPHTMLAnchorElement Object | FPHTMLAreaElement Object | FPHTMLLocation Object | IHTMLAnchorElement Object | IHTMLAreaElement Object | IHTMLLocation Object