tbaseflug
asked on
Interop Outlook - Create MSG in Windows Service
What I am trying to do - is create an Outlook MSG file via a windows service - I have the below, but on the SaveAs - I keep getting an error:
ystem.Runtime.InteropServi ces.COMExc eption (0x80004004): Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))
at Outlook._MailItem.SaveAs(S tring Path, Object Type)
Here is my code:
Outlook.Application objOutlook = CreateInstance();
Outlook.MailItem mic = (Outlook.MailItem)(objOutl ook.Create Item(Outlo ok.OlItemT ype.olMail Item));
mic.HTMLBody = "";
mic.SaveAs(@"\\DATA23\pdec at\test.ms g", Outlook.OlSaveAsType.olMSG );
ystem.Runtime.InteropServi
at Outlook._MailItem.SaveAs(S
Here is my code:
Outlook.Application objOutlook = CreateInstance();
Outlook.MailItem mic = (Outlook.MailItem)(objOutl
mic.HTMLBody = "";
mic.SaveAs(@"\\DATA23\pdec
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.