HasNextLink Property

Microsoft Publisher Visual Basic

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse Indicates the specified text box does not have a forward text box link.
msoTriStateMixed
msoTriStateToggle
msoTrue Indicates the specified text box has a forward text box link.

expression.HasNextLink

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

Example

This example breaks all links in the document to the first specified text frame if links exist. This example assumes that there is at least one shape on the first page of the active publication.

Sub AddPreviousNextLinkPages()
    With ActiveDocument.Pages(1).Shapes(1).TextFrame
        If .HasNextLink Then .BreakForwardLink
        If .HasPreviousLink Then .PreviousLinkedTextFrame _
            .BreakForwardLink
    End With
End Sub