Fixed font Subject: "E_Abort" error
Author: RDA Date: 04 Nov 2010
References:
When I run the below snippet of code on a Vista Enterprise box using
Outlook 2007, the following error occurs:

"An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in MyApp.exe.
Additional information: Operation aborted {Exception from HRESULT:
0x80004004 (E_ABORT)}"

The snippet is below and the line where the error occurs is commented.
I would appreciate any support, tips, or advice. Thanks.

////begin code/////

private void ProcessPosts(MAPIFolder oFldr, MAPIFolder
oDestFldr)
{
int iAttachCnt = 0;

//cycle through each email, filtering out only posts, no
personal emails, calendars, or tasks
string filter = "[MessageClass] = \"IPM.Post\"";
Microsoft.Office.Interop.Outlook.Items oTestItems =
oFldr.Items.Restrict(filter);

for (int i = oTestItems.Count; i > 0; i--)
{
Status("Cycling through discussion email...", 10);

//get post message
PostItem oMessage = (PostItem)oTestItems[i];

//move email
oMessage.Move(oDestFldr);

//get attachment count
iAttachCnt = oMessage.Attachments.Count;

//declare subject variable
string strSubject;

//determine if subject is null and set variable
accordingly
if (oMessage.Subject == null)
{
strSubject = "";
}
else
{
strSubject = oMessage.Subject.ToString();
}

//create etav_emails GUID
Guid tmpEmID = Guid.NewGuid();



//ERROR OCCURS HERE at "oMessage"
string sem = oMessage.SenderEmailAddress.ToString();


/////end code////
04 Nov 2010"E_Abort" errorRDA