Start Word with autostart macro fails with Word 2003

J

J.A.R. Karremans

Hi everybody,

I have a macro, called "Correspondentie" that works perfectly with Microsoft
Word 2000, no problem!
I can even call winword.exe with paramters and the macro just starts.

We are now migrating to Office 2003 (including word 2003). No Problem! The
macro still runs perfectly...
The only (and that's the "bitch") thing is, the macro won't autostart
anymore with the exact same command-line as with Word 2000... What has
happened? I even disabled all macro security, but, no result...

Somebody, please HELP!!
 
C

Cindy M.

Hi =?Utf-8?B?Si5BLlIuIEthcnJlbWFucw==?=,
I have a macro, called "Correspondentie" that works perfectly with Microsoft
Word 2000, no problem!
I can even call winword.exe with paramters and the macro just starts.

We are now migrating to Office 2003 (including word 2003). No Problem! The
macro still runs perfectly...
The only (and that's the "bitch") thing is, the macro won't autostart
anymore with the exact same command-line as with Word 2000... What has
happened? I even disabled all macro security, but, no result...
What's the command line?

In what file is this macro stored?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
J

J.A.R. Karremans

Hi there Cindy,

Sorry for not quoting this...
Here goes:
The command-line is:

c:winword correspondentie2000.dot /t:par_doc=c:\test.doc /:par_reva=1
/:par_insc=28570 /:par_beha=41278

the default directory on c: = c:\program files\microsoft office\office11
this command is started from the directory where Correspondentie2000.dot
resides.

In Word 2000 this command-line works fine. In Word 2003, nothing happens
(automatically). When the macro is started from within Word (after a manual
start) it works fine in both cases, as wel...

Regards and thanx already,
Jan
 
C

Cindy M.

Hi Jan,

There are some things I don't recognize in this command line...

Apparently, it actually opens the correspondentie2000 template. But what comes
after that is something I've never seen before. I'd expect a template name to
follow the /t, and the switch /: is something I've never seen before. I get
the impression these are supposed to be some kind of parameters. That being
the case, I'm wondering if you're supposed to have some kind of ADD-IN that's
picking this up? And the Add-in isn't installed on you new machine?
The command-line is:

c:winword correspondentie2000.dot /t:par_doc=c:\test.doc /:par_reva=1
/:par_insc=28570 /:par_beha=41278

the default directory on c: = c:\program files\microsoft office\office11
this command is started from the directory where Correspondentie2000.dot
resides.

In Word 2000 this command-line works fine. In Word 2003, nothing happens
(automatically). When the macro is started from within Word (after a manual
start) it works fine in both cases, as wel...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
J

J.A.R. Karremans

Hi there Cindy.

Wow, you're sharp in analysing! You're complete right, except for the part
that the plugin wouldn't be installed. It is installed and it works as well.
The file c:\test.doc is opened and should be processed by Correspondentie
2000 with the /: parameter. (And it does, if you start in manually) Started
automatically, it just does nuthin' at all!! And that's so strange, because
the exact same syntax with Word 2000 works wonderfully wel!!

So the big puzzle is why Correspondentie2000 doesn't activate while it does
with Word 2000 and with Word 2003 if started manually...

Regards,
Jan
 
C

Cindy M.

Hi =?Utf-8?B?Si5BLlIuIEthcnJlbWFucw==?=,
You're complete right, except for the part
that the plugin wouldn't be installed. It is installed and it works as well.
The file c:\test.doc is opened and should be processed by Correspondentie
2000 with the /: parameter. (And it does, if you start in manually) Started
automatically, it just does nuthin' at all!! And that's so strange, because
the exact same syntax with Word 2000 works wonderfully wel!!

So the big puzzle is why Correspondentie2000 doesn't activate while it does
with Word 2000 and with Word 2003 if started manually...
You still haven't answered a question I asked at the very beginning: WHERE is
this macro stored?

There's nothing in the command line that would trigger a macro named
"Correspondentie". The only macro I would expect to trigger, given what I see
in the command line, is one named AutoOpen or Document_Open in the file
correspondentie2000.dot. Or the code would have to be in the Add-in and be
firing based on an event in Word such as DocumentOpen or DocumentChange.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
J

J.A.R. Karremans

Hi there Cindy,

Sorry for the delay in getting back to you ;-)
As for my try to answer your questions:

- You still haven't answered a question I asked at the very beginning: WHERE
is
this macro stored?
I guess this macro is stored in Correspondentie2000.dot, the file that is
loaded at startup. This is also the module which comprises the "plug in"
Correspondentie for Word.

So, deriving from your post, is it possible that there has been a change in
command for automatically firing a macro when migrating from Word 2000 to
Word 2003? That could be an answer as to why it will nog auto-start now
anymore!!

Thanx in advance,
Regards,
Jan
 
C

Cindy M.

Hi =?Utf-8?B?Si5BLlIuIEthcnJlbWFucw==?=,
Sorry for the delay in getting back to you ;-)
As for my try to answer your questions:

- You still haven't answered a question I asked at the very beginning: WHERE
is
this macro stored?
I guess this macro is stored in Correspondentie2000.dot, the file that is
loaded at startup. This is also the module which comprises the "plug in"
Correspondentie for Word.

So, deriving from your post, is it possible that there has been a change in
command for automatically firing a macro when migrating from Word 2000 to
Word 2003? That could be an answer as to why it will nog auto-start now
anymore!!
Well, you do need to know how your addin is constructed; no one else can do
that for you :) And trouble-shooting isn't going to be easy if you don't know
how it's been constructed!

In order to execute when a template is opened, the macro would need to be named
AutoOpen or it would have to be the DocumentOpen procedure in the ThisDocument
module. Go looking for something like that and see what you find...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
J

J.A.R. Karremans

Hi there Cindy,

And right you are! Hmm, I will dive into Correspondentie. But, has the
working of Word changed then? Because it is exactly the same macro as used
with Word 2000!! And that works like a charm. For this to hold any clue,
there has to be a change made in Word 2003 to let it behave differently.
Perhaps because of more strick security??
Let me first try to answer your question...

Regards,
Jan
 
J

J.A.R. Karremans

Hi there Cindy,

Another thing.. I dove into Correspondentie and found the following:

The macro has a start-module called modStartUp which calls Correspondentie.
The things you mention; DocumentOpen in ThisDocument is not there. There is
also no macro called AutoOpen. Just VB script which talks to an Oracle
database and which runs...

The macro description with the icon in the start menu is also
Correspondentie.modStartup.correspondentie.

The thing that keeps bothering me is the fact that is does run as-is under
Word 2000 and that it will not budge under Word 2003!!

With some ready frustrated regards,
Jan
 
C

Cindy M.

Hi =?Utf-8?B?Si5BLlIuIEthcnJlbWFucw==?=,
The macro description with the icon in the start menu is also
Correspondentie.modStartup.correspondentie.
Ummm, what? Where are you finding this "macro description"? To
what macro is it referring, located where? This line would,
indeed, run what you're looking for. The question is, what
should be executing it?

Just throwing ideas out, here... Besides "Auto" macros, or
macros in the ThisDocument module of the template, the only
other thing that could execute would be a macro located in the
user's Normal.dot template. Could be AutoOpen or AutoNew
(although this would apply to all documents/templates). Or it
could be a macro called using the /mMacroName switch in the
command line. But your command line contains no /m switch...

However, if the upgrade to 2003 replaced the Normal.dot being
used with 2000, the answer might be in that.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17
2005)
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 :)
 

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