Macro for Search / Replace hidden text in MS Word 2016

I am trying to create a macro that will open advanced find and then will select “Hidden” text as the search item (with no characters specified–should find all hidden text in a document) and then will be ready for a search / replace maneuver.

But I am having no luck with my macro. Here it is:

Keyboard Maestro 8.2 “Hidden” Macro

Hidden.kmmacros (3.9 KB)

I am trying to create a macro that will open advanced find and then will select “Hidden” text as the search item (with no characters specified–should find all hidden text in a document) and then will be ready for a search / replace maneuver.

But I am having no luck with my macro. Here it is:

Keyboard Maestro 8.2 “Hidden” Macro

I’m trying to create a macro for word that will open advance find/replace (command-R) and format the search text for hidden.

Not working. Here it is. thanks.

Hidden.kmmacros (7.3 KB)

Have you tried using a Word VBA Macro for this? They are very powerful.
To get started, you can record a Word Macro, use you manual steps to make the changes, then edit the VBA Macro as needed.

If you need help with this, it would be best to record a short video/animated GIF showing the steps you manually take.

Word can also be controlled with AppleScript, so we have several options here. But I would not use hard-coded mouse clicks unless there are no other options.

Aside from what @JMichaelTX said, I’d recommend looking through the word menu bar instead of using keystrokes (check the help and type in what you’re looking for). If you do post a gif, I might be able to help.

Thanks, both.

I just found a VBA macro that does what is needed:

https://www.datanumen.com/blogs/3-easy-ways-to-permanently-remove-hidden-texts-in-your-word-document/

It’s not possible to do this through menu commands in KBM, which is why I resorted to recording a macro. But VBA is more powerful, as was noted above.

tx

1 Like