Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP with a Named Range argument modernminstrel Excel Worksheet Functions 1 October 13th 08 04:11 PM
Why Am I Getting the "Named Argument Not Found" Warning? Wuddus Excel Discussion (Misc queries) 2 August 31st 06 12:28 PM
Named argument not found T De Villiers[_54_] Excel Programming 1 July 24th 06 08:48 PM
Function (array argument, range argument, string argument) vba Witek[_2_] Excel Programming 3 April 24th 05 03:12 PM
Compiler Error - Named Argument Not Found Chris Excel Programming 7 September 8th 03 10:15 PM


All times are GMT +1. The time now is 04:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"