Does anyone have a Word macro that will prevent XE field codes and formatting from displaying after marking an index entry?
Does anyone have a Word macro that will prevent XE field codes and formatting from displaying after marking an index entry?
You can toggle the display of hidden text with
Sub ShowHidden() With ActiveWindow.View .ShowHiddenText = Not .ShowHiddenText .ShowAll = False End With lbl_Exit: Exit Sub End Sub
Graham Mayor - MS MVP (Word) 2002-2019
Visit my web site for more programming tips and ready made processes
http://www.gmayor.com
Graham,
Thanks, but I don't think this solves my problem. Word has a Mark Index Entry dialog. When you click Mark, Word automatically displays all formatting and XE field codes. This automatic, default action is what I am trying to prevent.
The display of hidden codes is intentional as an aid to seeing what you have marked and what you haven't. The macro posted attached to a ribbon or QAT button enables you to toggle between hidden and displayed. However you can inhibit the action, if you think you must, with a different macro, which will intercept the Word command.
Sub MarkIndexEntry() On Error Resume Next Application.Dialogs(wdDialogMarkIndexEntry).Show With ActiveWindow.View .ShowHiddenText = False .ShowAll = False End With End Sub
Graham Mayor - MS MVP (Word) 2002-2019
Visit my web site for more programming tips and ready made processes
http://www.gmayor.com