LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Excel Macro call Word Macro with Parameters

I have a macro in Excel that calls a macro in a Word document with this code:

wordApp.Visible = True
wordApp.Activate
wordApp.Run ("myMacro")

But when I changed the Word macro to require parameters, using the following
code, I get Run-time error '-2147352573 (80020003)' Unable to run the
specified macro:

wordApp.Visible = True
wordApp.Activate
wordApp.Run ("myMacro", 'String with spaces', numVal1, numVal2)

So I tried using the following code, but I get Object doesn't support this
property or method:

wordApp.Visible = True
wordApp.Activate
result = wordApp.Run ("myMacro", 'String with spaces', numVal1,
numVal2)

What code should I be using?

 
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
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
passing arguments from an excel macro to a word macro KWE39 Excel Discussion (Misc queries) 1 July 7th 05 03:56 PM
How To Call VBA Code from Excel 4 Macro Gaston Excel Programming 4 March 25th 05 09:47 PM
call .DOC from an Excel VBA macro ? Ayato Excel Programming 1 December 1st 03 11:26 PM


All times are GMT +1. The time now is 02:44 PM.

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

About Us

"It's about Microsoft Excel"