You (or your boss) need to think about how the form is going to be used. If
you distribute a Word document that has macros in it, when ever some one
opens that document:
1. If the user has the macro security level set to high, the macros will
be stripped from the document and your buttons will not work.
2. If the user has the macro security level set to medium, they will be
asked if they want to allow the macros to run. If they say No, the result
will be the same as in 1. above. If they say Yes, OK, your buttons would
work.
This means that your form should be designed as a template and then you will
have to give specific instructions to the users where they must save it and
that they must use it by selecting New from the File menu and then selecting
the template as the basis for the document that they wish to create.
Depending upon the exact purpose of the form, you may be better off to use a
userform rather than a protected document containing formfields.
You probably should take a look at:
Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22
Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46
Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119
Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127
Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136
To print the document, the code you would need in a macro is simply:
ActiveDocument.PrintOut
To see how to use VBA to email the document, see the article "How to send an
email from Word using VBA" at:
http://www.word.mvps.org/FAQs/InterDev/SendMail.htm
You will be able to learn a whole lot more about VBA by browsing that site.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"trilliums zjik discussions"
<(E-Mail Removed)> wrote in message
news:A0A7028B-0EB4-46F4-9920-(E-Mail Removed)...
> Suzanne,
>
> It is helpful to see how the "print" button could be concealed when the
> document is printed. Ihadn't thought about that, and having them not show
> up
> when printed will produce a more professional document. I'll have to do
> the
> same with the "email" button, but first have to find out how to work with
> VBA.
>
> Would anyone be able to address where and/or how I could learn the
> necessary
> VBA to accomplish all 4 components (a "print" button, and that it will not
> show up when printed, an "email" button, and that it will not show up when
> printed)?
> --
> Gratefully,
> trillium
>
>
> "Suzanne S. Barnhill" wrote:
>
>> You might want to see the article at
>> http://word.mvps.org/faqs/tblsfldsfm...rintButton.htm. This could
>> presumably be adapted to email the doc as well, but some VBA will be
>> required.
>>
>> --
>> Suzanne S. Barnhill
>> Microsoft MVP (Word)
>> Words into Type
>> Fairhope, Alabama USA
>> Word MVP FAQ site: http://word.mvps.org
>> Email cannot be acknowledged; please post all follow-ups to the newsgroup
>> so
>> all may benefit.
>>
>> "trilliums zjik discussions"
>> <(E-Mail Removed)> wrote in message
>> news:59584F8B-97FF-458F-AE0F-(E-Mail Removed)...
>> > Thanks, Doug. There isn't anything wrong with the print button on the
>> toolbar
>> > as far as I'm concerned...however, my boss feels differently...and what
>> > my
>> > boss wants...
>> >
>> > These forms are going to be distributed agency-wide, and it is felt
>> > that
>> > they would be more user-friendly if the document included command
>> > buttons,
>> > one offering to print, the other offering to email the document.
>> >
>> > Is there anyone that could help me accomplish these tasks?
>> > --
>> > Gratefully,
>> > trillium
>> >
>> >
>> > "Doug Robbins - Word MVP" wrote:
>> >
>> > > What is wrong with the print button on the toolbar? To keep it
>> > > company,
>> you
>> > > can use Tools>Customize to add the Email command to the toolbar.
>> > >
>> > > --
>> > > Hope this helps.
>> > >
>> > > Please reply to the newsgroup unless you wish to avail yourself of my
>> > > services on a paid consulting basis.
>> > >
>> > > Doug Robbins - Word MVP
>> > >
>> > > "trilliums zjik discussions"
>> > > <(E-Mail Removed)> wrote in message
>> > > news:EA805791-1CB3-46E6-AA3C-(E-Mail Removed)...
>> > > > First time creating templates. Want to add 2 command buttons: 1 to
>> "print"
>> > > > the other to "email" - can anyone help me with this?
>> > > >
>> > > > --
>> > > > Gratefully,
>> > > > trillium
>> > >
>> > >
>> > >
>>
>>