M
Michael H
Hi all,
I have an EntryID object that I'm getting from Windows Desktop Search.
I've verified that I'm using EntryID values that exist in Outlook (I
cycled thru each EmailItem in Outlook and printed out each
EmailItem.EntryID to compare what the Interop sees and what WDS spits
out). I don't have experience grabbing individual EmailItem objects
yet so I'm suspicious that I'm skipping a step or just doing something
wrong. I read that I don't need to specify the exact Outlook folder if
I have the EmailItem.EntryID value though I don't know if it was
written by a crazy person or a basic fact. Anyway, I'll paste a code
snipplet below and maybe somebody wiser than I with Outlook
programming can point out the errors. The COM exception thrown seems
to indicate that it doesn't like the input to
NameSpace.GetItemFromID(....) . The EntryID does exist, maybe it's the
StoreID I'm specifying?
Thanks a lot...
using Microsoft.Office.Interop.Outlook;
..
..
..
private ApplicationClass olApplication;
private NameSpace olNameSpace;
..
..
..
..
..
..
..
if (this.olApplication == null)
{
this.olApplication = new ApplicationClass();
this.olNameSpace = this.olApplication.GetNamespace("MAPI");
}
MailItem item = (MailItem) this.olNameSpace.GetItemFromID(strEntryID,
OlDefaultFolders.olFolderInbox);
..
..
..
..
I have an EntryID object that I'm getting from Windows Desktop Search.
I've verified that I'm using EntryID values that exist in Outlook (I
cycled thru each EmailItem in Outlook and printed out each
EmailItem.EntryID to compare what the Interop sees and what WDS spits
out). I don't have experience grabbing individual EmailItem objects
yet so I'm suspicious that I'm skipping a step or just doing something
wrong. I read that I don't need to specify the exact Outlook folder if
I have the EmailItem.EntryID value though I don't know if it was
written by a crazy person or a basic fact. Anyway, I'll paste a code
snipplet below and maybe somebody wiser than I with Outlook
programming can point out the errors. The COM exception thrown seems
to indicate that it doesn't like the input to
NameSpace.GetItemFromID(....) . The EntryID does exist, maybe it's the
StoreID I'm specifying?
Thanks a lot...
using Microsoft.Office.Interop.Outlook;
..
..
..
private ApplicationClass olApplication;
private NameSpace olNameSpace;
..
..
..
..
..
..
..
if (this.olApplication == null)
{
this.olApplication = new ApplicationClass();
this.olNameSpace = this.olApplication.GetNamespace("MAPI");
}
MailItem item = (MailItem) this.olNameSpace.GetItemFromID(strEntryID,
OlDefaultFolders.olFolderInbox);
..
..
..
..