Save a dot as doc and it opens with the userform from the dot!

F

Fred Geurtsen

Hi,

When I save my word97.dot file as a .doc and I open the doc file, it starts
with
the userform from the dot???
This is not what I want...Is there something that I have to put in my code
to prevent that?

Thx
 
B

Bill Foley

The name of the macro that opens the UserForm should be named "AutoNew".
That way the macro is only run when a new document is created based on the
template.

For example, if you have a UserForm called "UserForm1" that you want to open
when you create a new document based on a template, the code in your .dot
would be:

Sub AutoNew()
Load UserForm1
UserForm1.Show
End Sub

If the macro is named "AutoOpen" it will always run when a Word file is
opened

--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
"Success, something you measure when you are through succeeding."
 

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