ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   named argument not found (https://www.excelbanter.com/excel-programming/394558-named-argument-not-found.html)

Curt

named argument not found
 
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




Vergel Adriano

named argument not found
 
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


--
Hope that helps.

Vergel Adriano


"Curt" wrote:

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




Curt

named argument not found
 
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

"Vergel Adriano" wrote:

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


--
Hope that helps.

Vergel Adriano


"Curt" wrote:

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





All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com