i have a one 2003 excel file. using ofc.exe file i have converted the 2003 excel file in to 2007 exls file.
now my problem is before convert the file can i know the excel file is a macro excel file in c#.net ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Reading up on this answer I found that using
Application.VBE.ActiveVBProject.VBComponentseems to be what you want.A similar question was asked on the MSDN forums albeit that one concerns Visio not Excel. I’m sure you can adapt the code accordingly.
Further on this SO question asks exactly the same as you do. Albeit this answers does not seem to cover C#…
Over at the eggheadcafe one user suggests using this code snippet to loop through all VB-components: