0
我正在嘗試重命名EmailMessage對象中的附件。EWS C#附件無法更新
msg.Attachments.Where(c => c.Name == attachmentPdfFullNames[0]).FirstOrDefault().Name = "NEW NAME ATTACHMENT";
但它拋出異常附件不能更新。我試圖複製並更改名稱,然後刪除並重新添加附件,但相同的:
Attachment a = msg.Attachments.Where(c => c.Name == attachmentPdfFullNames[0]).FirstOrDefault();
Attachment b = a;
b.Name = "NEW NAME ATTACHMENT";
msg.Attachments.Remove(a);
msg.Attachments.AddFileAttachment("./" + b.Name);
感謝
感謝後重新添加附件,然後你,我會測試,我會回到你身邊。 – ArthurCPPCLI