General discussion

  • Creator
    Topic
  • #2130615

    Word 97: Use existing instance

    Locked

    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).

All Comments

  • Author
    Replies
    • #3567517

      Word 97: Use existing instance

      by dklippert ·

      In reply to Word 97: Use existing instance

      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

      • #3567388

        Word 97: Use existing instance

        by fixitright_thefirsttime ·

        In reply to 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?

    • #3567354

      Word 97: Use existing instance

      by dklippert ·

      In reply to Word 97: Use existing instance

      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.”

      • #3569480

        Word 97: Use existing instance

        by shanghai sam ·

        In reply to Word 97: Use existing instance

        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) ?

    • #3569479

      Word 97: Use existing instance

      by fixitright_thefirsttime ·

      In reply to Word 97: Use existing instance

      Point value changed by question poster.

    • #3569288

      Word 97: Use existing instance

      by dklippert ·

      In reply to Word 97: Use existing instance

      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.

      • #3568327

        Word 97: Use existing instance

        by fixitright_thefirsttime ·

        In reply to 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!

    • #3568326

      Word 97: Use existing instance

      by fixitright_thefirsttime ·

      In reply to Word 97: Use existing instance

      This question was closed by the author

Viewing 4 reply threads