VBA & Macro Problems

Minimize a Word Window from an Excel VBA Macro on Mac

Emma BrownEmma Brown Nov 18, 2026 868 views

Question details

The user wants to minimize Word while an Excel VBA macro creates a large number of labels on a Mac.

Minimize a Word Window from an Excel VBA Macro on Mac
Product
Microsoft Excel and Microsoft Word
Device & OS
macOS
Scenario
An Excel VBA macro opens Word and creates a label document.
Observed behavior
The Word window remains visible while the macro runs, and attempts to hide it have not worked as expected.
Before you start

Open the Excel workbook and locate the macro that creates the Word label document. Confirm that the code has references to the Word application and the newly created document.

Solution 1Recommended

Minimize the active Word document window

Use this approach after the macro creates and activates the Word label document.

Set the window state on Word's active window rather than relying on the document window's Visible property. The example uses the numeric Word minimize value, which avoids requiring a Word constant in Excel.

1
Open the macro

In Excel, open the VBA editor and find the procedure that calls Wrd.MailingLabel.CreateNewDocument.

2
Activate and minimize Word

Immediately after creating the document, add these lines, using your own variable names if they differ: Set oDoc = Wrd.MailingLabel.CreateNewDocument oDoc.Activate Wrd.ActiveWindow.WindowState = 2

3
Test the macro

Run the procedure from Excel and check that the Word document window minimizes after it opens. Continue testing the label-generation process on your version of Office for Mac.

Minimize the active Word document window
Use the Word window-state value: The accepted answer reported success with xlMinimize. The example above uses 2, the value of Word's wdWindowStateMinimize constant, so it does not depend on an Excel constant or a Word library reference.
Free Microsoft Office alternative

Edit label documents and spreadsheets with WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface for working with documents and spreadsheets. Its Microsoft Office format compatibility can help you move existing files, although it does not fix or replace the Word automation in this Excel VBA macro.

Edit label documents and their spreadsheet data in one office suiteOpen and edit common Microsoft Office formats, including DOCX and XLSXUse a familiar interface to ease the move from Microsoft OfficeGet a free, lightweight alternative for everyday office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Where should I add the minimize command?

Add it in the Excel VBA procedure after the line that creates the Word document. Activate the document first, then set Wrd.ActiveWindow.WindowState to 2.

Why use a Word window-state value instead of an Excel constant?

The target is a Word window, so its WindowState expects a Word WdWindowState value. The numeric value 2 represents wdWindowStateMinimize and can be used without a Word library reference.

Will turning off ScreenUpdating minimize Word?

No. ScreenUpdating controls screen refreshes, not the window's minimized state. You can test Wrd.ScreenUpdating = False for performance, but restore it to True when the macro finishes, including after an error.

Can WPS Office fix this Microsoft Word automation issue?

No. The solution changes the Word window state in the existing Microsoft Office VBA macro. WPS Office is an alternative for editing compatible documents and spreadsheets, not a fix for that automation.