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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading a Form - Startup for Specific Word Doc

Status
Not open for further replies.

Rougy

Programmer
Oct 15, 2001
249
US
HI,

I'd like to load a user form during the start up of a specific Word document, but for no other.

Any ideas?

Thanks,

Rougy
 
I believe you can do so by entering the following line of text on the documents open event:

UserForm.show

The "UserForm" would be the name of the form you want to open. I hope this helps & if I'm wrong I hope somebody corrects me.
 
Thanks, but where is the menu that allows me to edit the open event?

Thanks again. I'll check into it.

Rougy
 
In the current project that you're working in there should be a module called "This Document" (it may be found in the "Microsoft Word Objects" folder in the project explorer). When you double click the "This Document" module to bring up the code window you can access the document's open, close & new event from the Procedure list. You final result may end up looking like this:

Private Sub Document_Open()
FormName.show
End Sub
 
You're a champ! Thank you!!!

Rougy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top