Hi Greg,
Nobody else has bitten on this one so I'll have a say although I can't
really answer your question.
There are some actions - perhaps limited to file I/O - which seem to have
some prerequisite actions that cannot be done from VBA, or allowed to happen
while VBA code is running, but which happen automatically when break mode is
established. Word is in some kind of state where it cannot perform the
action and that state is freed only when code is stopped. Does that all make
sense?
You can see the same behaviour if you put some DoEvents in AutoExec macros
and then double click on a document to open it. The DoEvents allows the
Document to (try to) open before Word is ready and you get a 'cannot find
file' message. If you add a msgbox to the macro and then press Ctrl+Break
and then Debug and F5 the document opens and the automacro runs to
completion without error - the break mode having been enough to clear the
hurdle (whatever it is).
I would love to understand this but all I can manage at the moment is to
observe, and be aware.
--
Enjoy,
Tony
> I discussed this issue in a very long post yesterday as a sidebar and
> thought it better to simplify my observations and question here as a
[quoted text clipped - 31 lines]
>
> Can anyone explain why this happens? Thanks.
Helmut Weber - 29 Oct 2006 11:33 GMT
Hi everybody,
I blame problems like that on multitasking,
that is to say, that a process starts before
the preceeding process was completed,
in a very simplified manner.
I've tried to arrange commandbars in a document
to be opened in autoopen or autoexec or autonew.
No way. An ontime macro was required.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"