named argument not found

C

Curt

doing something wrong
recorder with macro recorder worked fine in letterhead now can't find?

Dim Word As New Word.Application
Dim WordDoc As New Word.Document
Word.Visible = True
Set WordDoc = Word.Documents.Open("C:\parade\letterhead.doc")
With WordDoc
Application.Run MacroName:="Macro3"
ActiveWindow.Close
End With
 
V

Vergel Adriano

Curt,

I'm not familiar with Word objects, but seems like you missed a "." to
qualify the application object as the word application..

Perhaps these lines:

Application.Run MacroName:="Macro3"
ActiveWindow.Close

should be like these:

..Application.Run MacroName:="Macro3"
..ActiveWindow.Close
 
C

Curt

made it go thru as needed now other parts are needing adjustment
thanks
Takes a long time to open excel then run macro also said letterhead was locked
Thanks Again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top