Outline Property

Microsoft Publisher Visual Basic

constant that represents the state of the outline formatting property on the characters in the specified text range. Read/write.

MsoTriState can be one of these MsoTriState constants.
msoCTrue Not used with this property.
msoFalse None of the characters have outline formatting.
msoTriStateMixed Return value indicating a combination of msoTrue and msoFalse.
msoTriStateToggle Set value which toggles between msoTrue and msoFalse.
msoTrue All characters in the range have outline formatting.

expression.Outline

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

Example

This example tests all the text in the second story of the active publication, and if it has mixed outline formatting, it removes all outline formatting. If all or none of the text is formatted as outline, a message box is displayed telling the user that outlining is not mixed.

Sub OutlineStory()

    Dim stf As Font

    Set stf = Application.ActiveDocument.Stories(2).TextRange.Font
    With stf
        If .Outline = msoTriStateMixed Then
            .Outline = msoFalse
        Else
            MsgBox "Outlining is not mixed in this story."
        End If
    End With

End Sub