From: Graham Mayor on
As Doug has said, if you have other macros then the additional macro does
not of itself create a problem. I cannot see why you would have to
repeatedly click the button, unless the supporting macro is accessing a
different shape in the dcoument from

With ActiveDocument
.Shapes(1).Visible = msoFalse
.PrintOut Background:=False
.Shapes(1).Visible = msoTrue
End With

but then it shouldn't work at all.

As your form is only page 2 of your document, you could put the button(s) on
page 1 and use the button to print page 2 and then the problem of hiding it
shouldn't arise.

I don't know if it will further your project but see
http://www.gmayor.com/ExtractDataFromForms.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


"Dale" <millennum125(a)yahoo.com> wrote in message
news:u88aVl47KHA.1316(a)TK2MSFTNGP02.phx.gbl...
> Interesting, I took the example from the website I referenced earlier,
> protected it and had to click repeatedly on the commandbutton to get it
> to fire. I agree with you, getting users to enable macros is
> problematic, I'm not sure I can get away with not doing this...the
> commandbutton is not the only item using macros, I have a userform as
> well....unless I really dummy down the form.
>
> Are you saying if I assign all my macros to a toolbar I
> won't get the enable macros warning and the toolbar will function? For
> instance the print commandbutton prints only the current page, I can
> accomplish the same thing with a toolbar?
>
> I have users using Word 2000 to 2007 to further complicate things.
> thanks
> --
>
> Graham Mayor wrote:
> Frankly Active X controls are best left to the web pages they were
> intended for.
>
> The problem for this type of control is that you have to activate
> macros, and you have no control over users' willingness to run
> macros. Beyond that - and assuming that you inserted the button into
> a text box as instructed, it should work in a protected form - and
> does here without issue.
>
> If you are creating the form in Word 2003, then it would be better to
> create a floating toolbar for the print command. Toolbars don't print
> nor require macros. If you are creating for Word 2007 and know that
> users will have this application, then I would add a ribbon tab to
> the document and put the button on that tab.
> http://gregmaxey.mvps.org/Customize_Ribbon.htm
>
> There is no universal solution that all users will be able to adopt.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
>
> "Dale" <millennum125(a)yahoo.com> wrote in message
> news:%23OQIhx37KHA.644(a)TK2MSFTNGP04.phx.gbl...
> Hello,
> I'm using this method to hide a commandbutton on a Protected word
> form: http://word.mvps.org/faqs/tblsfldsfms/HidePrintButton.htm
> This method works well with an unprotected form, but with the
> protected form I have to repeatedly click on the commandbutton to
> get it to fire. Have I done something wrong?? Any suggestions?
> Thanks
> --