Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to start a VBA app from outside Word

Status
Not open for further replies.

Jtorres13

Technical User
Nov 11, 2006
162
US
How to start a VBA app from outside Word. I want to use VBA to populate fields in a Word document to build customized templates by just opening the template, typing a few words and clicking a button that will save the template in the proper, customized template folder. I want all this to be as automatic as possible because we have many templates to update.

I haven't started yet, and I have a vague idea on how to do all this. What I really don't know is, how to start and use the app from outside Word. I don't want Word to open because I don't want to open the Normal.dot. That is one of the templates to be modified. Is this possible?
I'm using Office 2003 on Windows XP SP3.
 
I do not understand. This is the VBA forum, therefore you MUST be in an Office app. So what exactly do you mean by "outside of Word"?

"I don't want Word to open because I don't want to open the Normal.dot. That is one of the templates to be modified. Is this possible?"

1. Unless you are runnning the VBA, say from Excel, you are going to have to open Word. Even then...you are still going to have to open Word. There is no way around it.

2. You are using VBA to modify Normal.dot? Bad idea.

Bottom line? "How to start a VBA app from outside Word. " VBA is VBA and you must be in some Office app to execute VBA. You can call a procedure as a macro from the commandline, so that Word starts up and executes that procedure, but you are still in Word.

Gerry
 
Hmm, OK. Thanks for the quick reply. It helps, at least I won't rack my brain trying to figure it out.
 
I want to use VBA to populate fields in a Word document to build customized templates by just opening the template, typing a few words and clicking a button that will save the template in the proper, customized template folder. "

THIS is commonly done, except for maybe building customized templates. Templates - real templates - are rarely built (almost never!) as a run-time operation. real templates are designed and constructed, and user should never touch them.

However, populating fields and clicking a button to save the document file is normal to do. So I suspect that for the most part what you seem to want to do, can in fact be done.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top