How to put button in document.

S

Serendipity

Using Word 2003. Where do I start to program a button that will appear in my
document for the user to click on to execute the code I attach to the button.
User form? then command button? But then it doesn't show up in my Word
document?

I am a beginer--though I have written a lot of code in Access. Just don't
know how to begin in Word. After Alt +F11, what do I do?

Thanks for your help.
Serendipity
 
C

Charles Kenyon

Putting a button directly in the document is an old method. Much easier is
to build a custom toolbar with the single button or command on it and have
that button in the document. Note, though, that in many installations, your
code will be disabled if placed in a document unless digitally signed by
trusted source.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
S

Serendipity

That is a great idea. Now this further question. That sounds like how I would
do it if I were recording a macro and then putting that macro on a button on
a toolbar. How would I get the code on a button if I went to VBA (Alt + F11)
and wrote code for a button. Would I write in to a command button on a user
form? Then how would I make it show up back in my Word document.

Thanks/Serendipity
 
J

Jonathan West

Serendipity said:
Using Word 2003. Where do I start to program a button that will appear in
my
document for the user to click on to execute the code I attach to the
button.
User form? then command button? But then it doesn't show up in my Word
document?

I am a beginer--though I have written a lot of code in Access. Just don't
know how to begin in Word. After Alt +F11, what do I do?

Thanks for your help.
Serendipity

"How to hide a ""Print"" commandbutton on a document form when a user clicks
on it"
http://www.word.mvps.org/FAQs/TblsFldsFms/HidePrintButton.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
C

Charles Kenyon

No, just write the macro, then assign it to your toolbar button using Tools
Customize.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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