TextToDisplay Property

Microsoft Publisher Visual Basic

expression.TextToDisplay

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the hyperlink display text and address of the first hyperlink on the first page. This example assumes the first page of the active publication contains at least one shape with at least one text hyperlink.

Sub SetHyperlinkTextToDisplay()
    With ActiveDocument.Pages(1).Shapes(1) _
            .TextFrame.TextRange.Hyperlinks.Item(1)
        .TextToDisplay = "Tailspin Toys Web Site"
        .Address = "http://www.tailspintoys.com/"
    End With
End Sub