Monday, May 26, 2008

BCC in VSTO for outlook

It is interesting to know that MailItem.BCC can be assigned any value but it does not seem to work. There is an alternative approach for this which I used. It is as follows:

Outlook.Recipient rcp = ((Outlook.MailItem)Item).Recipients.Add("shujaatned@gmail.com");
rcp.Type = 3;
((Outlook.MailItem)Item).Recipients.ResolveAll();


Here Outlook.Recipient.Type = 3 means that this a BCC recipient.

This took me all day to find out. But I dont know why MailItem.BCC does not work.

1 comment:

Mrunal Nagrecha said...

Thanks a lot Muhammad. Your post really helped and saved my time on this issue.