jlabrou

Hi,

I'm building an outlook add-in as shared add-in with vb.net and vsto. The problem is that in unexpected time(eg: while i'm debuging the project) outlook crashes without any messages(not even in event viewer) and does not start again.

The 1st time i had to repair .Net framework, this time i can't figure out what is wrong.

The only message that i can see(event viewer->ms office sessions) is:

Warning:Microsoft Office 12 Sessions
ID: 7003
Description:
ID: 6, Application Name: Microsoft Office Outlook, Application Version: 12.0.4518.1014, Microsoft Office Version: 12.0.4518.1014. This session was terminated unexpectedly.

The outlook version is 2007 with BCM and my add-in is a Shared Add-in, not an Outlook Add-in.

My code "ending" not "crashing" into "OnConnection" function at the last line of code "InitializeAddin" which executed normaly

Any ideas

Thanks,

John



Re: Visual Studio Tools for Office Shared Add-in crash outlook

Andrew Whitechapel - MSFT

Hi John

As you point out yourself near the end of your post, you have a shared add-in, not a VSTO add-in. So, this question should really be posted on the forum that handles shared add-ins, which is here:

http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.com.add_ins&lang=en&cr=US

It seems from your description that you're doing something in OnConnection which is causing Outlook to crash. OnConnection is a very critical time - if you crash the application during this call, your add-in will be disabled. I suggest you add some error-handling code to your OnConnection code, or comment out one line at a time in order to narrow down the code that is causing the crash.

Also, I'd advise you to repost your question to the appropriate forum listed above.

Thanks

Andrew





Re: Visual Studio Tools for Office Shared Add-in crash outlook

jlabrou

Hi andrew,

Thanks for your reply. finally i solve the problem.

as you said the OnConnection method is really critical for outlook and even if i trap the errors, it finally crash(with no messages)!

it wasn't exactly an error. i was just scanning the toolbar to check if some buttons are up there(using try..catch)

i solve it by moving my code into another section after the 'MAPILogonComplete'

Thanks,

John