Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Placing a control on a document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
plh - 02 Feb 2007 12:17 GMT
Hi all,
I am new to Word VBA but have extensive experience with it in Excel and Access.
I am sure this is simple: I need to put a control on the document, as opposed to
the user's tool bar, and then give it a click or double click event, in order to
start things rolling. Ideally I would want a command button but that does not
seem to be an option, at least, I don't see it. What is the best way to proceed?
Thanx,
-plh

Signature

Where are we going and why am I in this HAND BASKET??

Lisa - 02 Feb 2007 15:12 GMT
On the main menu in Word, go to View | Toolbars, then select "Control
Toolbox" from the pop-up list (click so checkmark shows in front of it).

This will display the Control Toolbox toolbar in Word. Clicking on the
Command Button button on the toolbar will create a Command Button at the
current insertion point (where your cursor is in the document).
Jean-Guy Marcil - 02 Feb 2007 15:50 GMT
plh was telling us:
plh nous racontait que :

> Hi all,
> I am new to Word VBA but have extensive experience with it in Excel
[quoted text clipped - 4 lines]
> at least, I don't see it. What is the best way to proceed? Thanx,
> -plh

You could use a macro button field:

Do CTRL-F9 to insert a pair of field delimiters: {}

Then type something like this between the delimiters:

{MACROBUTTON name_of_your_macro Text to be displayed in document}

Finally, with the field selected, do SHIFT-F9 to toggle between field code
and field values.

The user need to double-click on the MacroButton field to launch the macro.

You could use an ActiveX button (from the Control Toolbox toolbar), but if
you plan on distributing your work, you may run in all kinds of problems
with macro security (ActiveX controls are blocked by the security system).

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.