Michael Vasilevsky
asked on
Word form with Command Button - Don't Show on Print
I have a Word 2007 doc with command buttons which I do not want to show when the document is printed.
Is this possible?
Thx,
MV
Is this possible?
Thx,
MV
Oh in Word 2007
Open file make sure macros are enabled
Click on Developer Tab
In ribbion click on Design Mode
Open file make sure macros are enabled
Click on Developer Tab
In ribbion click on Design Mode
ASKER
hmm I think you misunderstood, that code prints the document on the Click event. I want to set the "VisibleOnPrint" property of the command button to False so that it doesn't show up when a user manually prints the document. Does the "VisibleOnPrint" property exist in Word?
I know Access has the "Display When (Always, Print Only, Screen Only)" property for form controls. I'm looking for something analogous here, so I can display the command button on the screen only (not on print).
I hope that's clearer.
I know Access has the "Display When (Always, Print Only, Screen Only)" property for form controls. I'm looking for something analogous here, so I can display the command button on the screen only (not on print).
I hope that's clearer.
The above code....prints the document on the Click event. However, it will not print the button itsself on the print output. Try it on the test file, you will see what I mean.
ASKER
It did print the button...
Make sure this "CommandButton1_Click()" is changes to the appropiate (name) on your button properties. If you do Wors > File > Print it will print the button . If you click on the button it will not print the button. Sorry I cant post my file, site does not allow any xml, zipped or renamed :(
Here are some images...Hope this helps
Snap1.jpg
Snap2.jpg
Snap3.jpg
Here are some images...Hope this helps
Snap1.jpg
Snap2.jpg
Snap3.jpg
ASKER
Ok I see the code is for a 'Print Document' command button. I don't want to force my users to print from a custom button and don't think I could get them to comply anyway. So there is no command button property like what I'm looking for?
Ahhhh..I now understand.... I believe in Excel there is the option of changing "print object" (for the command button) to False and then the button does not print when the
worksheet is printed. But in Word, i am not sure.
However, if you place a macro button in the toolbar it should not print. Check out this link on how to...towards the end of the page
http://www.gmayor.com/inst alling_mac ro.htm
Hope this helps
worksheet is printed. But in Word, i am not sure.
However, if you place a macro button in the toolbar it should not print. Check out this link on how to...towards the end of the page
http://www.gmayor.com/inst
Hope this helps
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That was too simple. Thanks, I learnt something.
dragging up an old thread but how do I apply "hidden"? to the cmd button?
ASKER
Word 2007: In design mode right-click on cmd button, select CommandButton Object -> Edit, select all the text, go to the Home tab on the Ribbon, open the Font dialog box, check the Hidden Effect.
HTH,
MV
HTH,
MV
Thankyou!
Now, double-click on the CommandButton this will take you into the VBE (Visual Basic Editor) and create a CommandButton_Click event procedure. Paste the following code into this procedure.
Close the VBE, exit out of Design Mode and the CommandButton should not print
Open in new window