Everything seems to work as you say, but I did run into a configuration
question. I think I know what to do, but to make sure, I thought I should
ask.
My path to Outlook 2007 EXE looks like this:
C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE
I've got a break-point set on
Connect.Designer.cs
public void OnConnection(object application,
Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array
custom)
In Visual Studio, if you right-click on "PrepareMeAddinCSSetup" and choose
"Install", the installer (by default) chooses to install to:
C:\Program Files\Microsoft\Microsoft Office Outlook Sample Prepare Me Add-in
(CS)\
Now in Visual Studio, if I press F5, Outlook fires up just as you say, but I
don't seem to be hitting my break-point in the "PrepareMeAddin..." . I think
it is because the installer is saving the "PrepareMeAddin..." to the wrong
directory. Do you agree?
When you install Outlook Add-ins, are you supposed to install to the same
directory where Outlook EXE is located? So in my case, would it be -
C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE
Thanks again for your insight.
"Ken Slovak - [MVP - Outlook]" wrote:
> Select Project, Properties of the addin project and select the Debug tab.
> Use the setting for Start external program and navigate to where Outlook.exe
> is stored. Then when you press F5 or start the code in any other way it will
> start up Outlook.
>
> If you want to see the addin code running from the InitializeAddin() method
> on put your breakpoint on the first executable line in that method. If you
> want to see the Extensibility events that fire before InitializeAddin() then
> select the Connect class and then select Project, Show All Files. That will
> show Connect.Designer. Open that class and you will see the plumbing
> underlying the addin. You can then breakpoint in the OnConnection() event
> handler, which is what calls to InitializeAddin().
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "pkelley" <(E-Mail Removed)> wrote in message
> news:0246E004-6E29-4EC2-A9CA-(E-Mail Removed)...
> > This will seem very simple to some, but this is my first attempt at
> > writing
> > an Outlook Add-in, so just need a little nudge in the right direction.
> >
> > Host dev box:
> > Windows XP
> > Outlook 2007
> > MS Visual Studio 2005
> >
> > Downloaded from Microsoft and installed:
> > OutlookAddinTemplates
> > Outlook2007SampleAddin
> > - PrepareMeAddinCS
> > - PrepareMeControlCS
> > - PrepareMeShimCS
> > - PrepareMeAddinCSSetup
> >
> > I successfully rebuilt all 4 "PrepareMe..." projects from the
> > Outlook2007SampleAddin above.
> >
> > I right-clicked "PrepareMeAddinCSSetup" and selected "Install" and that
> > seemed to be successful.
> >
> > I next wanted to run Outlook and go into DEBUG mode in Visual Studio, but
> > I'm not sure how to do this.
> >
> > 2 Questions:
> >
> > 1. Given the "PrepareMe..." CS projects above, where do you recommend I
> > set my first Debug Break-point so that I can watch how execution works
> > inside
> > an Outlook Add-in?
> >
> > 2. How do I tell Visual Studio 2005 that I want to launch the Outlook
> > 2007 EXE so that the debug versions of "PrepareMe..." are hit?
> >
> > Thanks for any help
>
>