views:

215

answers:

1

I am frustrated trying to program macros for Visual Studio (using VS 2008, Version 9.0.30729.1 SP, with all updates).

In the Macro Explorer, I can go to Micorsoft's samples/VSEditor and add a Subroutine that behaves as I desire. But I can't seem to make it work anywhere else. In particular, in the MyMacros area in Macro Explorer.

Details:
I have copied the entire samples/VSEditor code and copied it to MyMacros/Testing and renamed the internal module name to Testing and saved the modified code. Macro Explorer now shows the Testing module and all of the Subroutines it contains. If I right click on, say, InsertDate and select Run, nothing happens. But if I scroll down to the samples/VSEditor/InsertDate and right click and select Run, it inserts the date as one would expect. It is virtually identical code (just the location and name changes mentioned above) but one runs and the other doesn't.

Is there any way to obtain feedback on what is happening/where the code is failing/why the code is failing?

Can anyone explain what I am doing wrong?

+1  A: 

I tried the same thing, copied VSEditor code to MyMacros/Testing. Things would not run either.

I then went to the menu option View|Error List. Then to the menu option Debug|Build in the Microsoft Visual Studio Macros editor. I saw that the Utilities was not declared (first error in the error list). When I copied the Utilities over to MyMacros. The macros started to work.

Maybe this is the same problem you are having.

Ron Todosichuk