View Single Post
  #7  
Old April 22nd 08, 11:58 AM posted to microsoft.public.outlook.program_addins
Marcin
external usenet poster
 
Posts: 9
Default Access to MailItem properties before opening new inspector ?

There must be some kind of caching, I don't exactly know what kind of, but in
fact, I would like to prevent caching at all :-), or get possibility of
reading items from cache before they are displayed in inspectors or explorers.

Anyway, thanks a lot for You hint on ConversationTopic. I started playing
with it, however, experienced a small problem using
Application.AdvancedSearch :
string filter = "[ConversationTopic] = '" + Item.ConversationTopic + "'" ;
try
{
StringBuilder SearchScope = new StringBuilder("'" +
Application.Session.GetDefaultFolder(Outlook.OlDef aultFolders.olFolderSentMail).FolderPath + "'");
SearchScope.Append(",'" +
Application.Session.GetDefaultFolder(Outlook.OlDef aultFolders.olFolderInbox).FolderPath + "'");
SearchScope.Append(",'" +
Application.Session.GetDefaultFolder(Outlook.OlDef aultFolders.olFolderDeletedItems).FolderPath + "'");
//exception is caught on line below - "The operation failed."
Outlook.Search SearchPotentialParents =
Application.AdvancedSearch(SearchScope.ToString(), filter, true,
ThisAddIn.AdvancedParentSearchTag);
}

Any idea why would it fail ? The error message is not really meaningful :-(

kind regards

marcin

"Sue Mosher [MVP-Outlook]" wrote:

What cache are you referring to? I can think of at least three different contexts in which "cache" would be relevant. Please start a new topic thread with more details.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Marcin" wrote in message ...
Thanks a lot,Sue, will have a look at this immediatelly.

By the way - do you happen to have any references on Outlook caching and
cache access/manipulation from API ?

Kind regards

marcin

"Sue Mosher [MVP-Outlook]" wrote:

You might find the sample code at http://www.outlookcode.com/codedetail.aspx?id=1714 useful, as it shows how to use the value of the ConversationIndex property to locate the original item from which a reply or forward was created.

"Marcin" wrote in message ...

To make it short - when executing action like reply or forward on MailItem,
I need to access the original message.



Ads