Link to home
Start Free TrialLog in
Avatar of SnowFlake
SnowFlakeFlag for Israel

asked on

vs2005 wont run any macros

my vs2005 refuses to run any macros.
It does record macros but when I try to run them nothing happens.

this is even for the simplest macros such as :
Public Module RecordingModule
    Sub TemporaryMacro()
        DTE.ActiveDocument.Selection.Text = "aaa"
    End Sub
End Module

Tools- > Options -> Environment-Add-in/Macros Security first two checkboxes are checked.
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

If you already restart your VS2005, then open then open your Macro IDE and check if you dont have any error in the error list.  
Avatar of SnowFlake

ASKER

I did (restart) and no, there is no error in the error list.
>> there is no error in the error list.

You have build it in the IDE Macro Editor to ensure that ?

You can also in the IDE Macro Editor select Debug -> Enable debuggin and then add some breackpoints to your macro.
when I press build inside the IDE macro editor nothing happens
and if I try to set debug and add a breakpoint the breakpoint symbol is hollow and it says that "The breakpoint will not currently be hit. no symbols have been loaded for this document".
:(
I also noticed that when I select "Enable debugging" I get the following on my output window:

'vsmsvr.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[4908] vsmsvr.exe: Managed' has exited with code 0 (0x0).

(where is this 'Just My Code'  setting and what does it mean ?
That message appears to me to.

Have you check the references. Do you have EnvDTE, EnvDTE80, VSLangProj and VsMacroHierarchyLib ?
I have all of them on my Mymacros solution AND
Microsoft.VisualStudio.CommandBars
Microsoft.Vsa
System
System.Windows.Forms

(and the samples solution also has System.Drawing)
maybe I should remove some of them ?
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have graded answer Q with a  B grade,
because although it would probably work it is too drastic for me to implement,
so basicly I was left will the problem.
but still I prefer grading myself.
if it was possible I would have given a higher grade for the help effort and a lower one for the effort's results.

thanks jpaulino