confused about normal.dot

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I'm pretty new to Word Automation from VB. I inherited a mass of code and
got it to work pretty well in our setting, but am now stuck here: If I open
two sessions of word, and in each open one document, then close one session
(no changes made to the doc), by doing a Word.Quit I always get prompted
about Normal.dot being "in use by another aplication or user". I hit OK (the
only choice) and then get a save as dialog box for normal.dot. I cancel and
then I'm back in Woord. When I then exit, I get asked if I want to save
changes to Normal.dot, say no, and then I'm out. This situation makes my
program unusable, because the users will not accept all this interaction.

If I do all this outside of automation, that is launch 2 copies word form
the desktp, open a doc in each, then close on, I get none of this, I just
exit smoothly.

Any ideas?
 
I doubt you are opening two instances of Word from the desktop. Why do you
want to do this in your application?
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Thanks, excellent questions.
1. You're absolutely right, from the desktop, 2 copies of Word do NOT get
started, as the task list tells me.
2. I'm starting separate copies in my app because that's what the code I
inherited does.

There is a lot of code and I didn't have time nor any good reason (as I do
now) to revisit that peculiarity. The code creates word docs, allows viewing
them, and also allows converting them to tiff using, naturally, Word. There
can be multiple instances of these 3 operations going on simultaneously. For
each of the three operations, the app (which consist of 2 exes and 1 dll)
launches a copy of Word doing New Word.Application, and it does it in 3
different places in the codes, so the requisite redesign and re-write to use
just one Word instance is not a small effort, which I am about to embark on.

Another question: it turns out that the reason my Word opens and updates
Normal.dot each time Word is launched is that there is one 3rd party startup
macro that does it, I have no idea why, nor what it does, nor will it be easy
to find out in this large (about 1000 seats) installation. But my follow-up
question is this: is there any way to launch Word in such a way that the
startup macros do NOT run? I know I can shell out to Winword.exe /m to get
this effect, but I need to continue to use the Office Automaton methods, so I
need to be able to have a Word.Application oject in my code.

Thanks.
 
You are likely to get more knowledgeable responses in the
public.word.vba.customization newsgroup.

winword.exe /a starts a default setup copy of Word if that helps.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Back
Top