SHELL function and Word 2000

Erik told me that this was probably of general interest: We had the following problem after upgrading from Office 97 to 2000: Navision’s SHELL function didn’t wait any longer for Word to finish when a document was opened, which is really great if you want to save the modified document back into Navision [:p]. This only happened when Word was already open at the time of the call to SHELL. After hours of searching and several (expensive) calls to Microsoft support it turned out that Word 2000, upon startup, checks if it is already running, and if so, yields control to the already running instance. The new process then dies immediately, giving Navision the illusion that it has finished. Fortunately, Word supports the /W and /N options, which cause it to keep the new process running independently. Using these options (one of them brings up Word with a new, empty document, the other simply starts it), everything works as it did in the Good Old Days of NT/97 [8D]