1
votes

How to read fields (To,Bcc,CC,Body,attachment,...)filled by user in compose new email in outlook with VS 2010?

I add a new button new message box in outlook with C#

I want when user click the button read the fields this code for the the custome button:

But what is not shown in the messageBox.

Outlook.MailItem item; item = (Outlook.MailItem)Globals.ThisAddIn.Application.ActiveInspector().CurrentItem; System.Windows.Forms.MessageBox.Show(item.To);

![my problems][1] thanks

[1]: http://i.stack.imgur.com/7mY9G.jpg"my problems"

1

1 Answers

1
votes

To/CC/BCC properties are returned based on the PR_DISPLAY_TO/CC/BCC MAPI properties, and they are only updated when the message is saved based on the contents of the recipients table.

Try to use MailItem.Recipients collection instead.