Result Property

Microsoft Publisher Visual Basic

expression.Result

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

Example

This example applies bold formatting to the first field in the selection. This example assumes that either text or a shape with text is selected in the active publication.

Sub GetFieldResults()
    If Selection.TextRange.Fields.Count > 0 Then
        MsgBox "The result of the first field is " & _
            Selection.TextRange.Fields(1).Result & "."
    End If
End Sub