Hyperlink.TargetType property (Publisher)
Returns a PbHlinkTargetType constant that represents the type of hyperlink. Read-only.
Syntax
expression.TargetType
expression A variable that represents a Hyperlink object.
Return value
PbHlinkTargetType
Remarks
The TargetType property value can be one of the PbHlinkTargetType constants.
Example
This example verifies that the specified hyperlink is a URL, and if it is, sets the hyperlink display text and address. This example assumes that there is at least one shape on the first page of the active publication.
Sub SetHyperlinkTextToDisplay()
With ActiveDocument.Pages(1).Shapes(1) _
.TextFrame.TextRange.Hyperlinks.Item(1)
If .TargetType = pbHlinkTargetTypeURL Then
.TextToDisplay = "Tailspin Toys website"
.Address = "https://www.tailspintoys.com/"
End If
End With
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.