SetCurrentFormPage("Message") causes Outlook to crash

J

Jacob Adams

I am building an Outlook 2007 Addin with VS 2008. I have a separate form
region for a mail item. I want to programmatically switch between the
separate region and the normal region.

CurrentFormPage("OtherRegion")

work perfectly fine, howver

SetCurrentFormPage("Message")

causes Outlook to crash. Is there some way to fix this. If not, is there
another way to programatically switch back to the main form region?
 
K

Ken Slovak - [MVP - Outlook]

What is CurrentFormPage()? It's nowhere in the object browser, only
SetCurrentFormPage() is there.

Is "Message" the actual name of the page you want to show?

Are you calling to ShowFormPage("Message") before you call to
SetCurrentFormPage()?

Do you have exception handlers so you can trap whatever error is occurring,
and error logging? Anything in the Office or Windows event logs for the
crashes?
 
J

Jacob Adams

Thanks for the quick response.
What is CurrentFormPage()? It's nowhere in the object browser, only
SetCurrentFormPage() is there.
Sorry, I meant "SetCurrentFormPage". That was a typo.
Is "Message" the actual name of the page you want to show?
I am assuming "Message" is the name of the page I want to show. Basically, I
just want to show the main default MailItem page in the MailItem inspector
(e.g. the area where you where you type the email). I assume the name of
this page is "Message" since that is what appears in the "Show" ribbon group.
Are you calling to ShowFormPage("Message") before you call to
SetCurrentFormPage()?
No. I tried that and that also causes Outlook to crash.
Do you have exception handlers so you can trap whatever error is occurring,
and error logging? Anything in the Office or Windows event logs for the
crashes?
I have a Try/Catch around the call, but that does nothing. The following is
the error log.

Event Type: Error
Event Source: Microsoft Office 12
Event Category: None
Event ID: 1000
Date: 7/29/2008
Time: 9:15:21 AM
User: N/A
Computer: JAKE
Description:
Faulting application outlook.exe, version 12.0.6316.5000, stamp 4833a470,
faulting module unknown, version 0.0.0.0, stamp 00000000, debug? 0, fault
address 0x0408f155.
 
J

Jacob Adams

If it helps, I am also getting these events in the Microsoft Office
Diagnostics group:

1) A crash has occurred. Office Diagnostics are running to determine whether
there is evidence of repeated problems.
2)The default thresholds are being used.
3)Office Diagnostics has determined that there is no evidence of repeated
problems.
4)Office Diagnostics is closing.
 
K

Ken Slovak - [MVP - Outlook]

"Message" should be correct unless it was changed as part of customizing the
form.

I really have no idea why your code is causing a crash. I've never seen that
happen without at least a trappable error. About the only thing I can think
of would be to open a case with MS and see what they turn up. They have
access to all sorts of crash debugging tools that the outside world doesn't
have access to or the symbols to make those tool's outputs meaningful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top