Forum Discussion
"Always show hidden text" - How to force OFF permanently, or create shortcut to reset easily??
- Apr 11, 2020
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.
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.
- KazranApr 17, 2020Copper 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.
- Jay FreedmanApr 20, 2020MVP
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.
- KazranApr 27, 2020Copper Contributor
Jay Freedman Hi Jay, our hidden text has returned!!
The IT guys opted to add a separate document (HiddenText.dotm) containing the AutoOpen() code into our shared folder which also contains Global.dotm (which houses a whole bunch of building blocks and a customised Word ribbon, etc.) and a couple of other documents. All users profiles are pointed to here.
I thought initially it had worked but a couple of days in I was told someone had had their display setting changed again and hidden text was locked on.
I'll be doing some testing with our IT guys later today, but just wondered if you might have any thoughts? I am devastated that this problem is still ongoing. Thank you in advance!