Document_New differences

M

Mark Dormer

I have a normal.dot template with some code in it to display a form.

Private Sub Document_New()
frmClassification.Show
End Sub

If I open the template directly it displays the form.
If I open Word from the Start Menu, it doesn't.
If I use File New once Word is open, it does work.

Seems to be a slight difference in how Word opens the first time. I recall
this from years past.
Can anyone fill me in on what it is and how to work around it.

Just for background
I need to call a form to get user input.
The input is about the type of document and is used to insert text in the
headers and footers.
I need this to apply to every document created or opened in any way.
I need to apply it so when the document is printed the header and footer
text is inserted.
I don't need to leave the headers and footers in the document
It is so when printed and left lying on the printer, we can seee the rating
of the document and the username who printed it.

Regards
Mark Dormer
 
A

Anne Troy

Mark: I don't think it's possible unless somebody comes up with some
workaround. BUT...I'm curious... most printers have a banner page facility.
It would seem to me that all the time you're spending to make this work
would pay for a lot of banner pages. :)
*******************
~Anne Troy

www.OfficeArticles.com
 
M

Mark Dormer

Banner or seperator pages are not particularly useful in this case.
They are quite limited in what they can do.
They can print the username, but not what I need to put in there.

Regards
Mark Dormer
 
H

Helmut Weber

Hi Mark,

putting your code in autoexec also, might help.

Though as far as I know, there are problems with all auto-macros.
Insofar as all of a document and all of it's template
is available only after the auto-macro is completed.

A possible workaround may be to put an ontime-macro
in the auto-macro, which waits some time, and calls
another macro containing the code, you tried to execute
from the auto-macro. Until then, the loading of the doc
will be completed, hopefully.

Greetings from Bavaria, Germany

Helmut Weber, MVP, WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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