Field.ShowCodes property (Word)
True if field codes are displayed for the specified field instead of field results. Read/write Boolean.
Syntax
expression. ShowCodes
expression An expression that returns a 'Field' object.
Example
This example selects the next field and displays the field codes.
With Selection
.GoTo What:=wdGoToField
.Expand Unit:=wdWord
If .Fields.Count = 1 Then .Fields(1).ShowCodes = True
End With
This example updates and displays the result of the first field in the active document.
If ActiveDocument.Fields.Count >= 1 Then
With ActiveDocument.Fields(1)
.Update
.ShowCodes = False
End With
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for