Open ALL Word docs in new Word instance

R

Rob Stewart

Is there a way to force Windows (XP) to open all Word documents (when their
icon is double clicked) in a new instance of Word?

I know there is the command line switch, but that doesn't help if the user
clicks a document icon.

I need to do this as we have a document with managed code attached. A number
of the custom menu items in that code require the document to be closed as
the final step. This is fine, except that as soon as you do a
Document.Close(), I find Word hangs as you have just closed the document to
which the executing code is attached. Solution: do an Application.Quit()
instead. Which is fine, until there are other, unrelated, documents open that
the user doesn't wish to close.

If I can guarantee any other docs will be open in their own instance of
Word, I can safely do Application.Quit() as there will only ever be 1
document open in that instance.

Any ideas?

Cheers,
Rob
 
P

Peter Huang

Hi,

When you double click a icon to open a word document, windows shell do the
job to invoke the winword.exe to open the document.
Now if we need to change the default behavior, we need to change the
default behavior that windows explorer open the DOC file.
We can do it by follow the steps below.
1. open a windows explorer
2. click Tools/Folder Options/File Types
3. navigate to DOC
4. click advanced, select open and then click Edit
5. Change the command line as below
"C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" /w %1

You may have a try and let me know the result.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Rob Stewart

Thanks Peter, BUT ... it made no difference. The command line was already set
to use the /n switch, which I would have assumed would have the same effect.

With /w, I still get docs opening in the same instance of Word.
 
P

Peter Huang

Hi,

Based on my test, /n and /w has the different behavior, you may try to
change the command line as /w to see if that works for you.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Rob Stewart

Peter,

/w still uses the same instance of Word. I get an icon in the taskbar for
each document because the Word "Windows in Taskbar" option is set, but Task
Manager still only shows one Word process.

I need multiple instances of the Word process in Task Manager.

Rob
 
P

Peter Huang

Hi,

The behavior is strange.
You may try to run the code below in the command line.
winword /w c:\test1.doc
winword /w c:\test.doc

On my machine, this will run two word instances.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Rob Stewart

Yes that works as expected (2 instances of Word). It is just doing it via a
document icon that is not behaving as expected.

I will check my settings again...

Rob
 

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