General discussion

Locked

Word 97: Use existing instance

By FixITright_theFirstTime ·
I am using Windows 98 (not SE), with Office 97 (OSR-2 applied). Recently I installed a program (an old version of WordViewer) that changed the way Microsoft Word behaves. Prior to WordViewer's installation, if I opened more than one document (i.e., double-clicked additional documents from Explorer or the desktop), it would simply use the same instance of Word. Now, it starts the program a second time. Is this a registry setting? Understandably, my user is quite upset over this change. Having everything open in one instance of Word is perfect!

P.S. Please do not suggest that I re-install Office as a first resort. I have checked other machines, and it seems to be Word's default behavior to open additional instances of the program (despite command line documentation to the contrary).

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Word 97: Use existing instance

by DKlippert In reply to Word 97: Use existing in ...

Word 97 is notorious for usually opening a fresh instance each time it?s started. Probably so much so, it becomes a ?feature? in Word 2000 and 2002.
Here?s a macro that fixes the feature
It?s from:

http://www.mvps.org/word/FAQs/MacrosVBA/CheckWordOpen.htm

(There are no spaces in the URL)
by Lutz Gentkow
Sub AutoExec()

Dim Hits As Long, oTask As Task

For Each oTask In Tasks
If Left(oTask.Name, 14) = "Microsoft Word" Then Hits = Hits + 1
If Hits = 2 Then
oTask.WindowState = wdWindowStateMaximize
Application.Quit
End If
Next oTask

End Sub

Collapse -

Word 97: Use existing instance

Your answer provides a good start. This worked successfully on one machine, but not on the main pc with the problem. There already is an AutoExec macro, but it is called AutoExec.Main and I am unable to edit it. Furthermore, when I added AutoExecwith this code, Word closes the first instance of Word (and all documents, too). This leaves only the second document open. Suggestions?

Collapse -

Word 97: Use existing instance

by DKlippert In reply to Word 97: Use existing in ...

As an experiment, rename the Normal.dot file on the recalcitrant machine to Normal.old
restart Word and then add the code to that machine.
Here's how the macro is supposed to work:

"Being an AutoExec macro, it fires automatically when you start a new instance of Word; and if it finds two open instances (the new one plus another one that was already open), then it activates the one that was already open and quits the new instance."

Collapse -

Word 97: Use existing instance

by Shanghai Sam In reply to Word 97: Use existing in ...

I hate the "rejected" label. I certainly want to credit you with points, but when I deleted the NORMAL.DOT file, it recreated another one with the same stuff. Is there a registry setting somewhere that's preventing modification of the AutoExec.Main macro (I can't delete it either) ?

Collapse -

Word 97: Use existing instance

Point value changed by question poster.

Collapse -

Word 97: Use existing instance

by DKlippert In reply to Word 97: Use existing in ...

Word automatically recreates Normal.dot. That?s natural. Take a look at the Tools>Options File Locations tab (I think that?s the same spot in W97)

See if there is another location for User Templates. Also look in the Startup directory. Somewhere you have another template bring in the macro. Try searching for Main.dot, if all else fails.

Let us know what you find out.

Collapse -

Word 97: Use existing instance

My culprit was a macro/template that was in Office's STARTUP folder. I temporarily removed it, and was FINALLY able to create the AutoExec macro specified in your second reply! Muchos gracias, senor!

Collapse -

Word 97: Use existing instance

This question was closed by the author

Back to Software Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums