Hi Jos,
Thank you very much. It is working after I did what
you said, but after run the macro, I gor another error
message:
Method 'Run' in COM object of class
'Excel.Application' returned error
code 0x800A9C68 (<unknown>) which means:<unknown>.

Do you know what cost this error?, and where can i
check the meaning of code 0x800A9C68?

Thanks
Jesse
 

--- Jos Litjens <[EMAIL PROTECTED]> wrote:

> Hi there,
>
> Have you figured it out yet? I had the same error
> message, turned out
> the statement misses some quotes. It should be:
>
> xlApp.Run("'c:\\Documents
>
andSettings\\jwang\\Desktop\\MonthlyTest.xls'!Macro1");
>
> So add a quote before c:\\ and after xls and it
> should work!
>
> Regards,
>
> Jos Litjens

>
> -----Original Message-----
> From: development-axapta@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of jessewang_98
> Sent: woensdag 13 juli 2005 1:12
> To: development-axapta@yahoogroups.com
> Subject: Re: SV: [development-axapta] Running Excel
> macros from Axapta
> through COM ?
>
> 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
>
>
>

>
>
>
>
>
>



           
__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html





YAHOO! GROUPS LINKS




Reply via email to