Is this MailItem a reply? Or is this Inspector-Item readonly?

Add-in Express™ Support Service
That's what is more important than anything else

Is this MailItem a reply? Or is this Inspector-Item readonly?
 
Taco Oosterkamp




Posts: 15
Joined: 2006-06-15
Hello,

Using ADX, I have added an adxOlInspectorCommandBar with one button to adxOLPost Items.

The aim is to make it easy for the user to archive the current e-mail to the main system (database).

At the customer's site, Outlook seems to run into problems when the button is clicked in a Reply.

As this doesn't make too much sense anyway, I want to disable the button when it is shown in a Reply Email Window.

Is there any way to check whether the current item is a Reply?
Or can I check to see if the current item is writeable?

Kind regards,
Taco Oosterkamp
Posted 15 Jun, 2006 08:33:20 Top
Taco Oosterkamp




Posts: 15
Joined: 2006-06-15
Hello,

I have done some more testing.

Outlook 2002 indeed crashes when I press my button, but only when MS Word is the e-mail editor.

So I fixed this problem by using the BeforeAdd event:

CmdBar.Visible := not Inspector.IsWordMail;

That works great for now. Still it wouldn't be bad to know how to check if the currently selected MailItem is editable or read/only.

Kind regards,
Taco Oosterkamp


Posted 15 Jun, 2006 09:48:07 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Taco,

Is there any way to check whether the current item is a Reply?


You can try to check the Sent property. It should be False in this case.

Posted 16 Jun, 2006 05:58:47 Top
Taco Oosterkamp




Posts: 15
Joined: 2006-06-15
Thank you Dmitry. I'll try that.

Kind regards,
Taco Oosterkamp
Posted 17 Jun, 2006 04:47:17 Top