I use Word 2003.
I am creating very big Word document(500 pages) using VBA macro. It takes
some minutes.
Macro uses 100% CPU in Normal prority for the Word process.
I can not open and edit other Word document in that time.
Can macro work in one process with changing document and I change other word
document in other process in the same time?
> Hi All,
>
> How to edit other Word document during Word macro is running?
>
> Best regards,
> Anton
Jonathan West - 15 Nov 2007 12:45 GMT
>I use Word 2003.
>
[quoted text clipped - 5 lines]
> word
> document in other process in the same time?
Short answer - No. Go and get a cup of coffee while the macro is running.
Longer answer. In theory yes, but I really wouldn't recommend it. You would
have to have designed your macro to make no use of Selection, Select,
ActiveDocument, Copy, Paste, PasteSpecial or PasteAndformat (and probably
some others that I have missed) otherwise manually switching to another
document and editing it will mess up the running of the macro. I suggest you
don't even try. If you need to be getting on with other work in the
meantime, the best approach is to get a second PC.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Jörg - 19 Nov 2007 13:54 GMT
To increase performance of other programms running in the background you can
insert a call to DoEvents in your loops. This may also increase performance
of your own word programm, because background jobs (like garbage collection)
are done.
fumei - 19 Nov 2007 16:33 GMT
I like both answers that have been given.
1. Yes, yes, yes. It depends on what your macro is doing, and how it is
doing it. We have no idea what it is doing, or how it is doing it. If there
are lots of loops, and it uses Selection for the work, then it may very well
be possible to speed up the macro itself.
2. DoEvents could be a viable option, especially if it seems to be using 100%
CPU.