Forum Discussion
Opening a Word document from an Excel spreadsheet
- Jan 30, 2026
YES, YES, YES! That works, Thank you so much.
Helloaekbus,
Yes, it’s possible to open a Word document directly from an Excel macro. You just need to automate Word from within Excel using VBA. A simple example looks like this:
Sub OpenWordDoc()
Dim wdApp As Object
Dim wdDoc As Object
Dim docPath As String
' Full path to your Word document
docPath = "C:\Users\YourName\Documents\Example.docx"
' Create a new Word application instance
Set wdApp = CreateObject("Word.Application")
' Open the document
Set wdDoc = wdApp.Documents.Open(docPath)
' Make Word visible
wdApp.Visible = True
End Sub
CreateObject(“Word.Application”) starts Word from Excel.
Documents.Open(docPath) opens the file.
wdApp.Visible = True ensures you can see Word; otherwise, it runs hidden.
If Word is already running and you want to attach to that instance instead of starting a new one, you can use:
Set wdApp = GetObject(, "Word.Application")
This way, your Excel macro can open and even interact with Word documents seamlessly.
This procedure worked all except the Visible = true. I have screenprinted the Properties window and the sub as I changed it to my variable names and pasted them into a Word document and will attach it if I can figure out how. Comment: This procedure is not helpful to the user if they cannot see the document. (Few computer skills)
- aekbusJan 30, 2026Brass Contributor
YES, YES, YES! That works, Thank you so much.
- Olufemi7Jan 30, 2026Iron Contributor
Hi aekbus,
You are right - in practice Word can open in the background, so just setting Visible = True is not always enough.
This version handles that and works even if Word is already running:
Sub OpenWordDoc()
Dim wdApp As Object
On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
On Error GoTo 0
If wdApp Is Nothing Then
Set wdApp = CreateObject("Word.Application")
End If
wdApp.Visible = True
wdApp.Documents.Open "C:\Path\To\Your\File.docx"
wdApp.Activate
End Sub
This forces Word to become visible and brings it to the front, so the user actually sees the document.