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!

MS Word and user form question

Status
Not open for further replies.

MrMajik

IS-IT--Management
Apr 2, 2002
267
I'm trying to make up a MSWord document template that behaves similar to the way WordPerfect templates act, i.e., when the template document is opened, a form is displayed that gathers the necessary information and on OK the collected information is plugged into a new copy of the template document.

I made up the template document and designed a form in Visual Basic Editor to get the information, but I can't find how to call that form or where to put the call code so that the form comes up when the template opens. Can anyone help with this?
 
' put this code in the ThisDocument code window of your template
' replace UserForm1 with the name of your form


Code:
Option Explicit

Private Sub Document_New()
  UserForm1.Show
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top