Fix Excel VBA Macro Hanging When Pasting to Word on Mac
Question details
A VBA macro designed to copy data from Excel and paste it into Word stops responding on macOS.

- Product
- Microsoft Excel and Word
- Device & OS
- macOS
- Scenario
- Running a cross-platform VBA macro to automate copying data from an Excel workbook and pasting it into a Word document.
- Observed behavior
- The macro executes successfully on Windows but freezes or hangs specifically at the Paste command on a Mac device due to OS-specific automation differences.
Ensure you have updated Microsoft Office for Mac to the latest version and create a backup copy of your current VBA code before applying any modifications.
Adapt VBA Code for macOS Compatibility
Modify your macro to avoid Windows-specific OLE automation methods that natively cause freezing on Mac.
macOS handles application automation differently than Windows. Standard Paste commands between applications or methods like CreateObject often hang because Mac does not support Windows OLE or ActiveX automation natively.
Modern Mac Office applications are sandboxed, meaning direct communication between Excel and Word via VBA is heavily restricted.
Open the VBA editor in Excel and locate instances of CreateObject("Word.Application") or direct Paste commands used across different applications.
Replace the standard VBA cross-application automation with the AppleScriptTask function, which allows Excel to safely trigger an AppleScript to handle the Word pasting operation on a Mac.
Run the updated script step-by-step using the F8 key in the VBA editor to ensure it bypasses the Paste hang on macOS.

Seek Advanced Help on Stack Overflow
Consult the developer community for advanced, version-specific Mac VBA workarounds if standard adaptations fail.
Try WPS Office for Seamless Document Management
If cross-platform compatibility issues in Microsoft Office are slowing down your workflow, WPS Office offers a free, lightweight, and highly compatible alternative. Enjoy a familiar user interface that makes working with documents, spreadsheets, and presentations a breeze.
- 1. Download WPS Office: Visit the official WPS website and download the macOS version for free.
- 2. Open Your Documents: Launch WPS Office and directly open your existing .xlsx and .docx files without formatting loss.
- 3. Work Across Platforms: Enjoy stable and consistent document editing whether you are working on a Mac, Windows, or Linux device.

Frequently Asked Questions
Why does my Excel VBA macro work perfectly on Windows but freeze on a Mac?
Windows uses OLE and ActiveX architectures for seamless cross-application automation (like Excel sending data to Word). macOS lacks this architecture and relies on application sandboxing, which often causes standard Windows-based VBA cross-app commands to hang or crash.
Can I use CreateObject to open Word from Excel on a Mac?
While CreateObject works in some older Mac Office versions, it is highly unstable in modern sandboxed versions (Office 2016 and later) and frequently leads to application hangs. AppleScript is the recommended alternative.
What is the alternative to VBA for automating Mac Office applications?
On macOS, AppleScript is the native and most stable way to automate interactions between different applications. You can use the AppleScriptTask function inside your Excel VBA code to execute AppleScript files that handle interactions with Word.




