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

Re: Document_New differences by Anne

Anne
Fri Jul 22 00:58:48 CDT 2005

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


"Mark Dormer" <markd@mvpsx.org> wrote in message
news:OCuhOgnjFHA.3580@TK2MSFTNGP09.phx.gbl...
> 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
>
>



Re: Document_New differences by Mark

Mark
Fri Jul 22 01:26:43 CDT 2005

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


"Anne Troy" <ng@officearticles.com> wrote in message
news:uwJ1uJojFHA.3256@TK2MSFTNGP12.phx.gbl...
> 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
>
>
> "Mark Dormer" <markd@mvpsx.org> wrote in message
> news:OCuhOgnjFHA.3580@TK2MSFTNGP09.phx.gbl...
>> 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
>>
>>
>
>



Re: Document_New differences by Jay

Jay
Fri Jul 22 06:57:59 CDT 2005

Hi Mark,

The Document_ event procedures can't be made to apply globally, as
explained at http://word.mvps.org/FAQs/MacrosVBA/DocumentEvents.htm.
Instead, use AutoNew (in a regular module of normal.dot, not in
ThisDocument).

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

On Fri, 22 Jul 2005 14:44:30 +1000, "Mark Dormer" <markd@mvpsx.org>
wrote:

>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
>


Re: Document_New differences by Helmut

Helmut
Fri Jul 22 07:11:03 CDT 2005

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"