![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
We are trying to programmtically build a MailItem object in a .NET program and trying to save it as a .msg file. The code works up to the point of the SaveAs call, where it hangs indefinitely. What could be the issue? Please see the code below. We have ensured that no other instance of Outlook.exe is running when we run our program. Outlook.Application OutlookApplication = new Outlook.Application(); Outlook.NameSpace olNamespace = OutlookApplication.GetNamespace("MAPI"); olNamespace.Logon(null, null, false, false); Outlook.MailItem newMail = (Outlook.MailItem)OutlookApplication.CreateItem(Ou tlook.OlItemType.olMailItem); newMail.To = "; newMail.Subject = objEmailQueueLog.EmailTemplateSubject; newMail.Body = objEmailQueueLog.EmailTemplateBody; ", Outlook.OlSaveAsType.olMSG); newMail = null; olNamespace.Logoff(); olNamespace = null; Thanks, Yash |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook Automation Automation Problem Out of Memory | MikeA[_2_] | Outlook and VBA | 7 | July 30th 07 02:31 PM |
MailItem.SaveAs method | Mrunali | Outlook - Using Forms | 0 | April 17th 07 03:16 PM |
Redemption's SafeMailItem.SaveAs method yields empty files | Alexander Bub | Outlook and VBA | 4 | August 9th 06 11:29 AM |
Outlook freezes on Redemption SaveAs | [email protected] | Add-ins for Outlook | 5 | April 27th 06 11:46 PM |
Outlook freezes on Redemption SaveAs | [email protected] | Add-ins for Outlook | 0 | April 27th 06 04:30 PM |