Do you have code example?
why I could not run this code:
static void test_ExcelMacro(Args _args)
{
COM xlApp;
;

xlApp = new COM("Excel.Application");
xlApp.Visible(1);
//xlApp.Run("MacroTest.xls!TestMacro");
xlApp.Run("c:\\Documents and
Settings\\jwang\\Desktop\\MonthlyTest.xls !Macro1");
// ...

}
Error Message:

Method 'Run' in COM object of class 'Excel.Application' returned
error code 0x800A03EC (<unknown>) which means: The
macro 'c:\Documents and Settings\jwang\Desktop\MonthlyTest.xls !
Macro1' cannot be found.



--- In development-axapta@yahoogroups.com, "Jens Strandberg"
<[EMAIL PROTECTED]> wrote:
> Thanks for your reply.
>
> The Excel stuff is set up properly and works just fine, when I run
the macro
> inside Excel.
>
> However, doing the "Run" on the COM object in Axapta tells me, that
this
> cannot be done... :-(
>
> Any additional input ?
>
> Best Regards,
> Jens
>
> -----Oprindelig meddelelse-----
> Fra: Amund [mailto:[EMAIL PROTECTED]
> Sendt: 16. september 2004 14:08
> Til: development-axapta@yahoogroups.com
> Emne: Re: [development-axapta] Running Excel macros from Axapta
through
> COM ?
>
>
> Inside VBA this would be something like: Application.Run
> "Workbook.xls!Macroname"
>
>  From Axapta you can use: <Excel COM-object>.Run("Workbook.xls!
Macroname");
>
> In general you may do what you want inside the macro recorder in
Excel (or
> Word, or..) and use the resulting VBA-code almost as-is in Axapta.
>
> Amund
>
>
>
> Thu, 16 Sep 2004 13:50:36 +0200 skrev Jens Strandberg
> <[EMAIL PROTECTED]>:
>
> > Hello there,
> >
> > I am using COM to display data from Axapta in Excel. Is there a
way to
> > tell
> > Excel to run a certain macro once the data has been moved to
Excel ?
> >
> > Thanks in advance !
> >
> > Best Regards,
> >
> > Jens
> >
> >
> >
> > Yahoo! Groups Sponsor
> > ADVERTISEMENT
> >
> > Yahoo! Groups Links
> >
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/development-axapta/
> >
> > To unsubscribe from this group, send an email to:
> > [EMAIL PROTECTED]
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
>
>
>
>
> Yahoo! Groups Links






YAHOO! GROUPS LINKS




Reply via email to