Forum Discussion

Kazran's avatar
Kazran
Copper Contributor
Apr 08, 2020
Solved

"Always show hidden text" - How to force OFF permanently, or create shortcut to reset easily??

We are using Lexis Affinity software which keeps ticking the "always show hidden text box" in our Word profiles.  In our office we use many letter precedents with hidden text, but staff are unable to hide it when this setting is on.

 

Is there a way to PREVENT Affinity from changing this setting (ie. to force it to always be unticked and unable to be changed)?

 

Failing that, is there a way to set up a keyboard shortcut/ribbon button so users can at least rectify the situation quickly and easily?

 

It happens all the time and is incredibly frustrating.  We would be so grateful for any assistance!

  • Kazran 

    You can install the following macro in each user's Normal.dotm template (or another .dotm template stored in the folder %appdata%\Microsoft\Word\STARTUP), and assign a shortcut and/or Quick Access Toolbar button to run it:

     

    Sub HideHiddenText()
         ActiveWindow.View.ShowHiddenText = False
    End Sub

     

    If the documents open with hidden text showing, you can make a copy of the same macro with "HideHiddenText" replaced by "AutoOpen", which will automatically execute each time a document is opened.

10 Replies

  • Kazran 

    You can install the following macro in each user's Normal.dotm template (or another .dotm template stored in the folder %appdata%\Microsoft\Word\STARTUP), and assign a shortcut and/or Quick Access Toolbar button to run it:

     

    Sub HideHiddenText()
         ActiveWindow.View.ShowHiddenText = False
    End Sub

     

    If the documents open with hidden text showing, you can make a copy of the same macro with "HideHiddenText" replaced by "AutoOpen", which will automatically execute each time a document is opened.

    • Kazran's avatar
      Kazran
      Copper Contributor

      Hi Jay Freedman 

       

      Thank you SO much for your response.  The first snippet of code you proposed is almost identical to what we have running immediately after a document is merged from the template (attached to the document via the Affinity merge engine, not the user's Normal).

       

      Unfortunately revisiting these documents later will result in the problem occurring, which is hopefully what your second suggestion can overcome. 

       

      Just so I'm clear, AutoOpen(), when attached to every user's Normal (or to our shared Global template), will automatically run whatever code it contains every single time a Word doc is opened?  And this is independent of the document type, any other macros that may be present, and the type of template it was originally merged from (.dotm, .dotx, etc.)?

       

      I'm fuzzy on how this all works but very excited about any possible work-arounds after dealing with it for so long!  Just want to make sure I'm clear before I take it to our IT guys.

       

      • Kazran 

        Your assumption is correct. The macro name AutoOpen is a special one; if that macro exists in the Normal template or in any *.dotm template stored in the Startup folder, it will run automatically when Word opens any document. 

Resources