-
How to open a specific word document in Excel VBA
hello everyone,
I looked everywhere but did not succeed to find a macro (for mac) who find and open a word document.
All the macros I found were leading me to an error message except this one but it is to open a new document :
Do you have an idea ?
Sub TestingMacAndWin()
Dim appWD AsObject
Dim wddoc AsObject
OnErrorResumeNext
Set appWD = GetObject(,"Word.application")'gives error 429 if Word is not open
If Err =429Then
Set appWD = CreateObject("Word.application")'creates a Word application
Err.Clear
EndIf
Set wddoc = appWD.Documents.Add
appWD.Visible =True
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules