I create a new mail item in C # VS-2008 outlook 2007 and attach the file. The first problem is that I do not see the attachment area in the subject line showing the attachment. If I send an email, its properties indicate that there is an attachment, and the size of the email has increased by the amount of the attachment. I just do not see it or not extracting the application.
Here is the code I'm using:
Outlook.MailItem mailItem = (Outlook.MailItem)this.Application.CreateItem(Outlook.OlItemType.olMailItem);
attachments.Add(ReleaseForm.ZipFile, Outlook.OlAttachmentType.olByValue, 0, "DisplayName");
I expect the "DisplayName" part to display as the name of the attachment, and I should use the file name.
I do not call .Send () on the email programmatically, I call mailItem.Display (true) to show the email to the user for any final changes. At this point, I can look at the properties and see that there is an application.
If I press send (send to myself), I see the same thing, the application seems to be there, but not accessible.
source
share