Trying to open Word Doc with Excel VBA

BadgerRoad

Active Member
Joined
Dec 2, 2005
Messages
301
Office Version
  1. 365
Platform
  1. Windows
I am trying to open a Word document with vba. Word will open but I'm getting an error on the Documents.Open line that says "Object Required". I've tried doing this many different ways but I keep getting the same error.
Any suggestions would be appreciated.

VBA Code:
Sub CreateWordApp()

Dim WordApp As Word.Application
Set WordApp = New Word.Application
WordApp.Visible = True
WordApp.Activate
'WordApp.Documents.Open ThisWorkbook.Path & "/" & "Mail merge list-online labels 875.docx"

WordDoc.Documents.Open "H:\Mail merge list-online labels 875.docx"

End Sub
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
It's WordApp.Documents.Open not WordDoc.Documents.Open
 
Upvote 0
I don't know how long I stared at this and couldn't see my stupid mistake!
Thank you.
 
Upvote 0

Forum statistics

Threads
1,224,856
Messages
6,181,424
Members
453,039
Latest member
jr25673

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top