Table of contents
TOC
Collapse the table of content
Expand the table of content

Hyperlink.TargetType Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

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 following PbHlinkTargetType constants.

| pbHlinkTargetTypeEmail| | pbHlinkTargetTypeFirstPage| | pbHlinkTargetTypeLastPage| | pbHlinkTargetTypeNextPage| | pbHlinkTargetTypeNone| | pbHlinkTargetTypePageID| | pbHlinkTargetTypePreviousPage| | pbHlinkTargetTypeURL|

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 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 Web Site" 
 .Address = "http://www.tailspintoys.com/" 
 End If 
 End With 
End Sub
© 2018 Microsoft