MailItem.Invoke("Display") returns S_FALSE (1)

S

splintor

I'm writing a C++ application that uses Outlook Automation to generate
an e-mail message and display it to the user for sending.

I'm using IDispatch interfaces to Outlook COM interfaces.

Everything works correctly on my machine. However, when the code is run
by one of our customers, everything also goes well until the call to
the Display method of the MailItem object is called. The mail message
is displayed, but the Invoke function called to invoke the "Display"
message returns S_FALSE (1) instead of S_OK (0), so my program reports
an error to the user.

In the Invoke method documentation
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/htm/chap5_61id.asp),
S_FALSE is not mentioned as a possible return value.

How should I treat this? How can I found out why the call to Invoke
returns 1? Can I safely ignore it, and only report the "0x800..."
returns codes as error?

Note that other calls to Invoke to set the Subject and HTMLBody
properties of the MailItem object succeed without any problem.

Thanks a lot in advance,
Splintor
 
Top