Go to Customise Ribbon (or Customize Quick Access Toolbar).Īdd the macro to whichever ribbon tab you like. Once you have the macro, attach it to the ribbon or Quick Access Toolbar. However neither of these macros is enough, see ‘ The Comments Catch‘ below. In a MsgBox the setting Options.PrintHiddenText will return True/False text. MsgBox ("Print Hidden Text: " & Options.PrintHiddenText) Options.PrintHiddenText = Not Options.PrintHiddenText pointed out the much shorter version that does the same job in two lines. It also allows for additional commands in the IF statement, which will be necessary, see below. The above code is deliberately simple with a full-form IF…Else. Comment the MSGBox lines out if you wish. Making the ribbon button change according to the setting is a whole different topic so we’ve kept it simple with a little message box to tell you the current setting. ' Switches the Word global option Print Hidden Text Instead dig into Word VBA then attach a short macro to a ribbon or QAT button.Īdd the following code to the document. Rather than dig down into Word Options, there is a way to change Print Hidden Text at the document level. In many ways, that’s a better and more flexible option than using Print Hidden Text. Change the style to make the hidden text visible or not. One choice we’ve already covered in Hiding in Styles is using a style with hidden text as an attribute. That makes it difficult, but not impossible to change the settings a document level or just for one print job. Microsoft could fix this but there’s little financial reason to do it. The decision was made many years ago and it’s now deep in Word’s complex code. Print Hidden Text is just one of many overall Word options that would make more sense at the document level. There’s no good answer except to say ‘History’. Why is this a global option for all Word documents rather than a choice set in each document, for example in the Print pane? After all, printing hidden text is something you’re likely to turn on/off for individual documents or separate print jobs. Hidden text positioning and formatting tricks in Wordįind and Remove Hidden Text in Word Why an overall Word setting? See: Hidden Text, Images and objects in Word Then go down to the Printing Options area and tick or untick the “Print hidden text” box, depending on your preference.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |