Hi!

I got a template with an AutoNew() Macro. When I open Word and select "New
Document" with this template, the AutoNew()-macro is called. But when I run
Word from DOS the macro isn't called. Why that? I'm using Word 2000. In Word
2003 I got the same problem.

Titus Kruse

Re: AutoNew deos not run with winword.exe by Doug

Doug
Tue Mar 14 06:16:28 CST 2006

An autonew macro only runs when a new document is created from the template
in which it is located. If you want a macro to run when word is started, it
should be named autoexec()

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Titus Kruse" <Titus Kruse@discussions.microsoft.com> wrote in message
news:84938E48-64CE-4B8C-8D2A-638556BE573A@microsoft.com...
> Hi!
>
> I got a template with an AutoNew() Macro. When I open Word and select "New
> Document" with this template, the AutoNew()-macro is called. But when I
> run
> Word from DOS the macro isn't called. Why that? I'm using Word 2000. In
> Word
> 2003 I got the same problem.
>
> Titus Kruse
>



Re: AutoNew deos not run with winword.exe by TitusKruse

TitusKruse
Tue Mar 14 07:00:27 CST 2006


Hi Doug!

I want to create a document from my template! My wish is to run Word from
the command shell with a previously created template. A macro in this
template should read data from a given .ini-file and merge this data with
fields in the new document. Because /t and /m couldn't be used together, I've
placed an AutoNew-Macro in my template.


"Doug Robbins - Word MVP" wrote:

> An autonew macro only runs when a new document is created from the template
> in which it is located. If you want a macro to run when word is started, it
> should be named autoexec()
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "Titus Kruse" <Titus Kruse@discussions.microsoft.com> wrote in message
> news:84938E48-64CE-4B8C-8D2A-638556BE573A@microsoft.com...
> > Hi!
> >
> > I got a template with an AutoNew() Macro. When I open Word and select "New
> > Document" with this template, the AutoNew()-macro is called. But when I
> > run
> > Word from DOS the macro isn't called. Why that? I'm using Word 2000. In
> > Word
> > 2003 I got the same problem.
> >
> > Titus Kruse
> >
>
>
>

Re: AutoNew deos not run with winword.exe by gils

gils
Wed Mar 15 05:48:15 CST 2006

Thanks !
Useful info. :)
Gil

"Doug Robbins - Word MVP" <dkr@REMOVETHISmvps.org> wrote in message
news:epULnE2RGHA.4608@tk2msftngp13.phx.gbl...
> An autonew macro only runs when a new document is created from the
> template in which it is located. If you want a macro to run when word is
> started, it should be named autoexec()
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "Titus Kruse" <Titus Kruse@discussions.microsoft.com> wrote in message
> news:84938E48-64CE-4B8C-8D2A-638556BE573A@microsoft.com...
>> Hi!
>>
>> I got a template with an AutoNew() Macro. When I open Word and select
>> "New
>> Document" with this template, the AutoNew()-macro is called. But when I
>> run
>> Word from DOS the macro isn't called. Why that? I'm using Word 2000. In
>> Word
>> 2003 I got the same problem.
>>
>> Titus Kruse
>>
>
>



Re: AutoNew deos not run with winword.exe by TitusKruse

TitusKruse
Wed Mar 15 06:48:29 CST 2006


Useful info? Yes. But the reply doesn't address the issue of my question. I
don't want to run a macro every time Word starts. And anywhere, even
AutoExec() doesn't run when the template has been called via shell command
winword.exe and the /t option.

Greetings, Titus


> Thanks !
> Useful info. :)
> Gil
>
> "Doug Robbins - Word MVP" <dkr@REMOVETHISmvps.org> wrote in message
> news:epULnE2RGHA.4608@tk2msftngp13.phx.gbl...
> > An autonew macro only runs when a new document is created from the
> > template in which it is located. If you want a macro to run when word is
> > started, it should be named autoexec()


Re: AutoNew deos not run with winword.exe by Cindy

Cindy
Sun Apr 09 12:32:44 CDT 2006

Hi =?Utf-8?B?VGl0dXMgS3J1c2U=?=,

> I want to create a document from my template! My wish is to run Word from
> the command shell with a previously created template. A macro in this
> template should read data from a given .ini-file and merge this data with
> fields in the new document. Because /t and /m couldn't be used together, I've
> placed an AutoNew-Macro in my template.
>
Word isn't designed to function like this; you can use the web interface to make
a "Suggestion" to Microsoft that you'd like to be able to invoke a macro in a
template when creating a new document from the command line.

/t will not execute AutoNew
/m must be in the Normal.dot template

If you were automating Word's object model, then the AutoNew would execute.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)