Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / October 2006

Tip: Looking for answers? Try searching our database.

write VS2005 Macros in C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Ludig - 12 Oct 2006 11:00 GMT
Is there a way to write Macros for Visual Studio 2005 in using C#
instead of visual basic? The Macro IDE only seem to support Visual
Basic. Is that correct?
Peter Macej - 12 Oct 2006 11:48 GMT
You cannot write VS 2005 macros in C#. You need to use VB .NET.

Signature

Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
.NET and ASP .NET code

Robert Ludig - 12 Oct 2006 12:10 GMT
Bummer !

Why is that so? I thought .NET languages is are interchangeable since
they all end up in IL anyway?

Is the whole DTE API acessible via COM? If so I could write  "Macros"
using the COM interfaces and C# .. (?)

Peter Macej schrieb:

> You cannot write VS 2005 macros in C#. You need to use VB .NET.
>
[quoted text clipped - 3 lines]
> VSdocman - Commenter and generator of class documentation for C#, VB
> .NET and ASP .NET code
Peter Macej - 12 Oct 2006 13:45 GMT
> Is the whole DTE API acessible via COM? If so I could write  "Macros"
> using the COM interfaces and C# .. (?)

You can access DTE from add-in as well. Add-ins are even more powerful
than macros and they can be written in C#. See Carlos's page about all
that stuff at http://mztools.com/resources_vsnet_addins.htm

Signature

Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
.NET and ASP .NET code

Dustin Campbell - 12 Oct 2006 16:09 GMT
I'm pretty certain that VS2005 still uses the older VBA technology for macros.
So, it really isn't VB .NET but VBA.

Best Regards,
Dustin Campbell
Developer Express Inc.
Peter Macej - 13 Oct 2006 08:19 GMT
> I'm pretty certain that VS2005 still uses the older VBA technology for macros.
> So, it really isn't VB .NET but VBA.

I don't agree that it isn't VB .NET. You can use complete VB .NET
syntax, use all .NET framework classes, create forms. There's almost no
limitation. It only doesn't create compiled assembly.
VS 2005 macros are written in pure VB .NET language.

Signature

Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
.NET and ASP .NET code

Carlos J. Quintero [VB MVP] - 13 Oct 2006 08:46 GMT
Hi Dustin,

The language for macros definitely is not VBA, it's VB.NET.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

> I'm pretty certain that VS2005 still uses the older VBA technology for
> macros. So, it really isn't VB .NET but VBA.
>
> Best Regards,
> Dustin Campbell
> Developer Express Inc.
Dustin Campbell - 13 Oct 2006 15:42 GMT
>> I'm pretty certain that VS2005 still uses the older VBA technology
>> for macros. So, it really isn't VB .NET but VBA.

Thanks for the correction guys -- much appreciated. I actually assumed that
they were still using VBA since C# wasn't a supported macro language. I wonder
why that's the case.

Best Regards,
Dustin Campbell
Developer Express Inc

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.