Add menu item that calls a program

B

Bill

I need to write a program that will add an item to the Word menu. When
the user selects this item from the Word menu an external program must
run that saves the current document to a specific folder then does
something with the file. I have controlled Word via automation from
programs before, however, I have never written a plugin that adds a
menu item which executes a program.

To my surprise I have not been able to find any information on writting
a plugin that adds a menu item after manu attempts with Google. That,
almost certainly, means I am not using the right keywords.

Can anyone point me to any articles, documentation or examples that
show how to write a plugin that adds a menu item to the Word menu and
that lets the menu item run another program when clicked? The program
can be either a COM object or an executable. Thanks.
 
J

Jezebel

You can't call an external application directly from an menu option. The
menu option calls a macro, and the macro calls the external application.
Since you need to put the macro somewhere -- an add-in is the obvious
choice -- you might as well make the menu option part of the add-in also.
Just set it up manually, and it will be available whenever the add-in is
loaded.
 
B

Bill

Jezebel said:
Since you need to put the macro somewhere -- an add-in is the obvious
choice -- you might as well make the menu option part of the add-in
also.

Can provide a reference with information about how to create an add-in?
That is the part I have had no luck finding information about. Thanks.
 

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