PC Review


Reply
Thread Tools Rate Thread

how can i run excel/word macro to C# .net programs

 
 
=?Utf-8?B?QWFxaWI=?=
Guest
Posts: n/a
 
      30th Oct 2007
i have macro in excel sheet in which data is sorted and some other functions.
i want to use that macro in C# .net
how can i use that.
 
Reply With Quote
 
 
 
 
crferguson@gmail.com
Guest
Posts: n/a
 
      30th Oct 2007
What exactly doy ou mean by using the macro in C#.net? Do you want to
activate or run the macro in the Excel workbook from C#, or do you
want to use the functionality of the macro in your C# program?


On Oct 30, 8:04 am, Aaqib <Aa...@discussions.microsoft.com> wrote:
> i have macro in excel sheet in which data is sorted and some other functions.
> i want to use that macro in C# .net
> how can i use that.



 
Reply With Quote
 
=?Utf-8?B?QWFxaWI=?=
Guest
Posts: n/a
 
      31st Oct 2007
yes, i want both
1) Activate and run the macro in the Excel workbook from C#,
2) Use the functionality of the macro in your C# program?
please answer whatever way you understand instead of re-asking.

"(E-Mail Removed)" wrote:

> What exactly doy ou mean by using the macro in C#.net? Do you want to
> activate or run the macro in the Excel workbook from C#, or do you
> want to use the functionality of the macro in your C# program?
>
>
> On Oct 30, 8:04 am, Aaqib <Aa...@discussions.microsoft.com> wrote:
> > i have macro in excel sheet in which data is sorted and some other functions.
> > i want to use that macro in C# .net
> > how can i use that.

>
>
>

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      3rd Nov 2007
You can use the Run method to run an existing macro. E.g.,

XLAppRef.Run "Book1.xls!TheMacroName"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Aaqib" <(E-Mail Removed)> wrote in message
news:5E774E72-4F8D-4C13-A914-(E-Mail Removed)...
> yes, i want both
> 1) Activate and run the macro in the Excel workbook from C#,
> 2) Use the functionality of the macro in your C# program?
> please answer whatever way you understand instead of re-asking.
>
> "(E-Mail Removed)" wrote:
>
>> What exactly doy ou mean by using the macro in C#.net? Do you want to
>> activate or run the macro in the Excel workbook from C#, or do you
>> want to use the functionality of the macro in your C# program?
>>
>>
>> On Oct 30, 8:04 am, Aaqib <Aa...@discussions.microsoft.com> wrote:
>> > i have macro in excel sheet in which data is sorted and some other
>> > functions.
>> > i want to use that macro in C# .net
>> > how can i use that.

>>
>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converstion of Complex Word VBA macro to Excel Macro Michael Microsoft Excel Programming 1 18th Jan 2008 12:21 AM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve Microsoft Excel Programming 3 6th Jul 2006 07:42 PM
Excel macro takes focus from other programs =?Utf-8?B?UlVM?= Microsoft Excel Programming 3 9th Aug 2005 01:56 PM
passing arguments from an excel macro to a word macro =?Utf-8?B?S1dFMzk=?= Microsoft Excel Misc 1 7th Jul 2005 03:56 PM
Excel VBA - Executing external programs in an excel macro schumacker Microsoft Excel Programming 1 24th Feb 2004 12:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:01 AM.