> Hi Andrew,
>
> What it sounds like to me is that you are running into a bug in the original
> VSTO 2005 SE which disabled Outlook 2003 VSTO solutions when Outlook was
> launched in "headless" mode. Make sure you have the latest version of the
> VSTO 2005 SE runtime installed. You can get the latest version here:
>
>
http://www.microsoft.com/downloads/details.aspx?familyid=8315654B-A5AE-4108-B7FC-186402563F2B&displaylang=en>
> "Andrew" wrote:
>
> > To eliminate bad code as being the possible reason, I commented out the
> > "oAddIn = New OutlookAddIn(Me)" code in the start up event and Outlook still
> > changed the loadbehaviour to "2" I believe that its a possible .NET Framework
> > 2.0 Security Configuration hole that isn't being covered up. What do you
> > think?
> >
> > Andrew
> >
> > "Ken Slovak - [MVP - Outlook]" wrote:
> >
> > > So it's a VSTO addin then.
> > >
> > > You can also check for Explorers.Count > 0 rather than using ActiveExplorer.
> > > Then if you have a NewExplorer handler you would then instantiate your other
> > > objects in that handler if you weren't already instantiated.
> > >
> > > --
> > > 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> > >
> > >
> > > "Andrew" <Andrew[ at ]discussions.microsoft.com> wrote in message
> > > news:A6D6EEEF-2A69-4D8E-BBA4-107867ED6EC6[ at ]microsoft.com...
> > > > It was hanlding the error, but that still changed the loadbehaviour to
> > > > "2",
> > > > so I added this, "If Exists(m_olOutlookApplication.ActiveExplorer) Then"
> > > > with the hope that preventing the error from happening may solve the
> > > > problem.
> > > >
> > > > VS 2005 SE(Visual Basic) are the development environment and language
> > > >
> > > > This is instantiated in the "ThisApplication" class which hooks the
> > > > "StartUp" event. oAddIn = New OutlookAddIn(Me) and passed to the class
> > > > below.
> > > >
> > > > Public Sub New(ByVal oApp As ThisApplication)
> > > > Try
> > > > m_olOutlookApplication = oApp
> > > > m_olInspectors = m_olOutlookApplication.Inspectors
> > > > m_olExplorers = m_olOutlookApplication.Explorers
> > > > If Exists(m_olOutlookApplication.ActiveExplorer) Then
> > > > m_olContactFolder =
> > > > m_olOutlookApplication.ActiveExplorer.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts)
> > > > olContactFolder = m_olContactFolder
> > > > 'm_olContactFolderItems = m_olContactFolder.Items
> > > > m_butNewEmailSyncToCS = Nothing
> > > > m_butNewEmailSendSyncToCS = Nothing
> > > >
> > > > CreateMainCSToolbar()
> > > > CreateClientSpaceProperty()
> > > > AddSyncedCompNames()
> > > > Else
> > > > Return
> > > > End If
> > > > 'Automatic_Login()
> > > > Catch ex As Exception
> > > > MsgBox("OutlookAddIn failed to initialize:" & vbCrLf & vbCrLf &
> > > > ex.Message)
> > > > Finally
> > > > End Try
> > > > End Sub
> > > >
> > > > The add-in isn't really being disabled as you assume, the loadbehaviour is
> > > > just being set to "2" To debug the code, I usually just hit the run button
> > > > and visual studio launches outlook. This method don't produce the desired
> > > > results because I assume VS "handles" the problems. I usually deploy the
> > > > msi
> > > > to another test machine to ensure its working as expected.
> > > >
> > > > Andrew
> > >
> > >