Pages::Add throws exception in Outlook 2000 addin

M

Matt Fletcher

I'm developing an addin which targets Outlook 2000 onwards, and trying to
programatically customise a form. I've managed to get most of what I want to
do to work with Outlook XP and Outlook 2003, but I fail at the first hurdle
with Outlook 2000 - I get a COM exception thrown by the attempt to add the
page in the following code:

try
{
PagesPtr spPages = m_spInspector->ModifiedFormPages;

if (spPages)
{
spPages->Add("Message");
}
}
catch(_com_error & e)
{
TRACE("Caught COM error: %s\n", e.ErrorMessage());
}

(m_spInspector is an InspectorPtr which my handler class is wrapping)

I have tried the two obvious things:
1. add a new page, rather than the exisitng page (even though this is what I
really want to do)
2. move the above code from a Mail::Open handler to an Inspector::Activate
handler

Can anyone shed any light on this, or is it just another problem with
Outlook 2000?

thanks
Matt Fletcher
 

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