Groups | Blog | Home
all groups > visual studio .net ide > june 2005 >

visual studio .net ide : Understanding Macros



Wayne Wengert
6/29/2005 10:34:48 AM
I am using VSNE2003/VB. I came across an article that included a handy macro
but I am lost trying to create the macro and I am also totally confused
about how to run macros. I am an old duck and to me, you create/record a
macro, give it a shortcut key and away you go. Reading the Help for macros
has me lost. The samples seem to be a collection of functions in a module? I
don't know if I want a macro project or a nacro module? How do I simply
create a plain old macro and assign it a shortcut?

Sorry to be so dense but I think I went off in the wrong direction here.

Wayne

Wayne Wengert
6/30/2005 3:21:22 AM
Carlos;

Excellent. That is exactly what I needed. Why couldn't the "Help" be as
clear?

Wayne

"Carlos J. Quintero [.NET MVP]" <carlosq@NOSPAMsogecable.com> wrote in
message news:%23OnBWHVfFHA.2152@TK2MSFTNGP14.phx.gbl...
[quoted text, click to view]

Carlos J. Quintero [.NET MVP]
6/30/2005 10:57:47 AM
Here we go:

* A macro in VS.NET is a VB.NET subroutine that executes some code.

* Macros (subroutines) can be grouped in VB.NET Modules

* VB.NET Modules can be grouped in Macro projects.

* You have a Macro Explorer window (View, Other windows, Macro Explorer
menu) to show your projects, modules and macros.

* You can create a macro in 2 ways:

- Recording it (Tools, Macros, Record TemporaryMacro menu). The code of the
recorded macro is always stored in the MyMacros project, RecordingModule
module, TemporaryMacro procedure. There is only 1 temporary macro, so if you
record a new macro, it replaces the previous macro code. You can run the
temporary macro with the menu Tools, Macros, Run TemporaryMacro.

- Typing code directly. You can use any macro project, any macro module and
any procedure name for the macro, and therefore you can have lot of macros.
To create macros in this way you need to know the object model of VS.NET.
You can run these macros selecting them in the Macro Explorer and using the
context menu "Run".

* You can assign keyboard shortcuts to any macro using the Tools, Customize
menu, Keyboard button, type "Macros" in the "Show commands containing"
textbox and look for you macro full name.



--
Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Wayne Wengert" <wayneSKIPSPAM@wengert.org> escribió en el mensaje
news:%23TFVzhMfFHA.1480@TK2MSFTNGP10.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button