From: Stanley on
I am using the following code to open a user form when I open a Word 2003
document.
Private Sub Document_New()
UserForm1.Show
End Sub
For some reason I can't get the user form to show.
I have this code in a template and I am opening the document from it. I also
have it in a private directory (not the template directory).
Thanks,
Stanley

From: Fumei2 via OfficeKB.com on
That does not make the userform show on document open.

Sub Document_Open()
UserForm1.Show
End Sub

If you have the code (Document_NEW) in the template, then when the template
is used to make a NEW document, the userform will display.

" I also have it in a private directory (not the template directory)."
I have no idea what you mean by that.

In any case, if you want a document to display a userform on document open,
then you must have the show instruction in a Document_Open procedure in the
ThisDocument code module of the document (not the template).

Stanley wrote:
>I am using the following code to open a user form when I open a Word 2003
>document.
>Private Sub Document_New()
>UserForm1.Show
>End Sub
>For some reason I can't get the user form to show.
>I have this code in a template and I am opening the document from it. I also
>have it in a private directory (not the template directory).
>Thanks,
>Stanley

--
Gerry

Message posted via http://www.officekb.com