Macro Button that don't print

S

SMOO

Hello,

I would like to add Macro Buttons to my form so users can activate a macro
in a protected form.

Is there a way to make it so the macro button shows up on the computer but
does not show up on the printed copy?

Warm Regards,

Summer
 
L

Lene Fredborg

I suppose you are talking about MacroButton fields.
You can format the MacroButton fields as hidden text (select "Hidden" in
Format > Font > Font tab). In order for this to work, hidden text must be
visible on the screen but hidden in print, i.e.:
"Hidden Text" and/or "All" must be _turned on_ below "Formatting marks" in
Tools > Options > View tab.
"Hidden Text" must be _turned off_ below "Include with document" in Tools >
Options > Print tab.

You may want your macros to handle the above settings:
ActiveWindow.View.ShowHiddenText = True
Options.PrintHiddenText = False

Note: I also tested the above with a command button created via the Control
Toolbox. When protecting the document for forms, that button was visible in
Print Preview even if it was formatted as hidden text (it was not visible in
Print Preview in the unprotected document). On the other hand, the
MacroButton field acted correctly in the protected as well as the unprotected
document.

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top