How to execute VB form in template

E

Eric

Hi, I used Visual Basic Editor under MS Word-->Tool-->Marco to create an User Form with some options and buttons. I want to use this Form for user to select different options and print different text on word document
How to save this Form in a new template and execute this Form when create a new document with this template automatically?
 
J

Jezebel

To put the form into another template: open the target template. Switch to
the VBE. In the Project Explorer, click and drag the form module from where
it is now to the target TemplateProject. This actually copies it rather than
moving it. Save the template, then delete the form from the original
location. You can also export/import the form by right-clicking and using
the Export and Import options.

To make the form display when a new document is created, add to the template
a macro called AutoNew. Insert instructions to show the form and do
whatever.



Eric said:
Hi, I used Visual Basic Editor under MS Word-->Tool-->Marco to create an
User Form with some options and buttons. I want to use this Form for user to
select different options and print different text on word document.
How to save this Form in a new template and execute this Form when create
a new document with this template automatically?
 

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