Mark some mail as special only for plugin

Add-in Express™ Support Service
That's what is more important than anything else

Mark some mail as special only for plugin
 
Giancarlo


Guest


I understood Handle events of Outlook Items object at https://www.add-in-express.com/docs/vcl-outlook-addins.php.

I saw that I can access to all mail: comfortable.
I have a doubt.
My inbox contains more than 3,000 email
I know people who have more than 10,000 email

I'm trying to mark a few mails, such as special.
(Only for the plugin, No for people)

Later I have to find them and work them.

I have 2 questions:
1) there is a field to record some of my settings?
For example:

Mail.Note := 'special';


2) how can I find them quickly?
Posted 09 Sep, 2016 04:02:04 Top
Giancarlo


Guest


I'm looking for an example in Delphi like this

https://www.add-in-express.com/forum/read.php?FID=1&TID=4993


I have yet to understand how to add custom property
Posted 09 Sep, 2016 05:33:51 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Posted 09 Sep, 2016 05:35:29 Top
Giancarlo


Guest


In the first procedure i add the property to e-mail in this way:

FMail: TMailItem;
FMail.UserProperties.Add('MyProp', olText, false, false).Value := 'test';
FMail.Save;


In the second procedure, i search the e-mail in this way:


ItemsEvents: TItems;
Item: IDispatch;
...
ConnectToFolderByIndex(ItemsEvents, 3);
...
Item := ItemsEvents.Find('[MyProp] = ''test''');


but i got this error:
add-in has fired an exception
Property "MyProp" unknow
Posted 09 Sep, 2016 07:49:47 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Giancarlo writes:
UserProperties.Add('MyProp', olText, false, false)


Try passing true in the AddToFolderFields parameter; see https://msdn.microsoft.com/en-us/library/office/ff867389(v=office.15).aspx.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2016 07:53:34 Top