ผมสร้าง
Outlook 2010 add-in ด้วย Visual Studio 2010
กับ dll
ปัญหา คือ ตอนที่มี
new email message เข้ามา พอผมคลิ๊กที่ลิงค์ mailto:emailaddress
หน้าเวปที่มีออปเจคของผู้รับ ก็ขึ้นปกติ แต่ตรง recipient.address
กลับไม่ขึ้น
เขียนว่า
"Object reference not set to an instance of an object"
แต่ถ้าผมพิมพ์
email address ตรงๆ ก็จะไม่มีปัญหา
foreach (SafeRecipient recipient in mailItem.Recipients)
{
if (recipient.Address.Contains("@")) //code fails here
{
recipients.Append(recipient.Address);
recipients.Append(",");
}
}
Supa Sethasiripong [MSFT]
MSDN Community Support |
Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.