0
votes

I need to display the fields code and use:

Document.Content.Fields.ToggleShowCodes

I have fields, some are in text boxes and need showing all of them.

But the above toggles - and I need more control. If the codes are showing, performs display fields results.

So I need if fields code are showing, do nothing, else show all fields code, even if they're are in the text boxes.

1

1 Answers

1
votes

You can use the View.ShowFieldCodes property which takes/accepts a Boolean:

ActiveWindow.View.ShowFieldCodes = True

It doesn't matter whether any or no field codes are currently displayed: ALL will be displayed.