Consulting

Results 1 to 4 of 4

Thread: Word macro do not show XE field codes/formatting

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Oct 2019
    Posts
    2
    Location

    Word macro do not show XE field codes/formatting

    Does anyone have a Word macro that will prevent XE field codes and formatting from displaying after marking an index entry?

  2. #2
    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

  3. #3
    VBAX Newbie
    Joined
    Oct 2019
    Posts
    2
    Location
    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.

  4. #4
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •