[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Force Hidden Text. vba?

I have a document in Word with instructions that I don't want printed.  I've made these instructions into hidden text, but if the user has the option to "print hidden text", the instructions will be printed.

I know I can delete the text when they print, but I need the instructions to always be in the document, just not printable.

Is there a way to force "hide hidden text"? Any suggestions?
0
ballistic
Asked:
ballistic
  • 2
1 Solution
 
DreamboatCommented:
Sure. You can force hidden text with a macro.
But, how will you ensure your users are allowing macros to run?

I'll get you the VBA if you want it.

And...do you want the hidden text to always be viewable and never to be printable, correct?
0
 
ballisticAuthor Commented:
These users will have macros enabled and will allow them to run.

That's right, always viewable and never printable.

I appreciate it.
0
 
Joanne M. OrzechManager, Document Services CenterCommented:
You can put this code in your document open event - or document new event:

    With ActiveWindow
        With .View
            .ShowHiddenText = True
        End With
    End With
    With Options
        .PrintHiddenText = False
    End With

HTH
0
 
DreamboatCommented:
Cool, JOrzech.

ballistic: Let us know if you don't understand what to do with the code.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now