How to Hide Field codes in a Word Document using VBA

Word VBA – Hide Field Codes

The following snippet will hide the field codes present in Word document.

Sub Hide_Field_Codes()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Application.ActiveWindow.View.ShowFieldCodes = False

End Sub