Keep a Hidden Microsoft Word Instance Separate from Visible Sessions
Question details
Keep an Access automation process's hidden Word instance separate from Word sessions opened by a user.

- Product
- Microsoft Word and Microsoft Access VBA
- Device & OS
- not provided
- Scenario
- An Access process scans thousands of Word documents in a hidden Word instance while users may open or close Word normally.
- Observed behavior
- The hidden Word process sometimes closes when a user opens or exits Word.
Find the Access VBA code or command that starts Word and opens the documents. Check whether it creates a Word application object or attaches to an existing instance.
Create and Retain a Separate Word Application in Access VBA
Use a dedicated Word application object when Access controls Word through VBA.
Keep the application object for the full automation job, and open documents through that object. Creating a separate instance reduces interference from a user's Word session, but it does not prevent crashes, external termination, or other automation errors.
In the Access VBA editor, initialize the automation job with `Dim wordApp As Object` followed by `Set wordApp = CreateObject("Word.Application")`. Use this reference instead of attaching to an existing Word session with `GetObject`.
Set `wordApp.Visible = False` and retain `wordApp` in a scope that lasts until the document-processing job finishes.
Use `Set wordDoc = wordApp.Documents.Open(filePath)` for each document, process it, and then call `wordDoc.Close SaveChanges:=False` if no changes need to be saved.
After processing, call `wordApp.Quit` and set the object references to `Nothing`. Add error handling that closes any open automation document and quits this instance if the job fails.
Run the Access job, then open and close Word normally. Check Task Manager and the Access job's results to confirm that the automation continues independently.

Start a New Word Instance with the /n Switch
Use this option when Word is launched from a command line and you want to test a separate instance.
Edit Word Documents with WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility for an easier move between office suites. It does not fix Microsoft Word's Access VBA automation behavior.

Frequently Asked Questions
Does hiding Word create a separate instance?
No. Setting `wordApp.Visible = False` hides the application represented by that object. Create and retain a dedicated object with `CreateObject("Word.Application")` when Access needs its own instance.
What does the Word /n switch do?
Running `WINWORD.EXE /n` starts a new Word instance without a blank document. It does not automatically connect an Access VBA object to that instance.
Why might GetObject connect to the wrong Word session?
`GetObject` can attach to a running Word application rather than the instance intended for the job. In Access VBA, create a dedicated application object and use its `Documents.Open` method instead.
How can I check whether the hidden job survives a user closing Word?
Start the Access job, open and close Word normally, and monitor Task Manager and the job's output. Also check the VBA error handler for document-opening errors or dialogs that could interrupt processing.




