Office Settings & Configuration

Keep a Hidden Microsoft Word Instance Separate from Visible Sessions

Steve KSteve K Nov 14, 2026 868 views

Question details

Keep an Access automation process's hidden Word instance separate from Word sessions opened by a user.

Keep a Hidden Microsoft Word Instance Separate from Visible Sessions
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.
Before you start

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.

Solution 1Recommended

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.

1
Create the application object

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

2
Keep Word hidden

Set `wordApp.Visible = False` and retain `wordApp` in a scope that lasts until the document-processing job finishes.

3
Open documents through the object

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.

4
Close only your instance

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.

5
Test alongside a user session

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.

Create and Retain a Separate Word Application in Access VBA
Check for prompts: Hidden Word can still encounter dialogs or document errors. Test with representative files and handle errors so a prompt does not leave the job waiting.
Free Microsoft Office alternative

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.

Open and edit Microsoft Word DOC and DOCX filesWork with documents in a familiar Writer interfaceUse a free, lightweight office suiteMove between common Microsoft Office file formats
microsoft office alternative - wps office

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.