![]() |
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
|
|||
|
|||
![]()
I am trying to create a COM AddIn in Delphi, and I want to use the
AdvancedSearch functionality of Outlook. If I am searching on the whole field, the following code works correctly 'urn:schemas:httpmail:subject = ' + QuotedStr(MyString) From Outlook, I have determined that to search on a substring, the code in VBA would be "urn:schemas:httpmail:subject" LIKE '%MySubString%' However, I have been unable to translate this successfully into Delphi. Can anyone help? Andrew Lockwood |
Ads |
#2
|
|||
|
|||
![]()
' "urn:schemas:httpmail:subject" LIKE ''%MySubString%'' '
-- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Andrew Lockwood" wrote in message ... I am trying to create a COM AddIn in Delphi, and I want to use the AdvancedSearch functionality of Outlook. If I am searching on the whole field, the following code works correctly 'urn:schemas:httpmail:subject = ' + QuotedStr(MyString) From Outlook, I have determined that to search on a substring, the code in VBA would be "urn:schemas:httpmail:subject" LIKE '%MySubString%' However, I have been unable to translate this successfully into Delphi. Can anyone help? Andrew Lockwood |
#3
|
|||
|
|||
![]()
Thanks - but it doesn't work!
It doesn't cause a crash like some of the options I have tried, so presumably this means that the filter is formatted in an acceptable way, but the search takes quite a long time and returns nothing! Whereas if I create a SearchFolder within Outlook using the same substring, it works perfectly and takes about 1 second! Andrew Lockwood "Dmitry Streblechenko" wrote in message ... ' "urn:schemas:httpmail:subject" LIKE ''%MySubString%'' ' -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Andrew Lockwood" wrote in message ... I am trying to create a COM AddIn in Delphi, and I want to use the AdvancedSearch functionality of Outlook. If I am searching on the whole field, the following code works correctly 'urn:schemas:httpmail:subject = ' + QuotedStr(MyString) From Outlook, I have determined that to search on a substring, the code in VBA would be "urn:schemas:httpmail:subject" LIKE '%MySubString%' However, I have been unable to translate this successfully into Delphi. Can anyone help? Andrew Lockwood |
#4
|
|||
|
|||
![]()
Are you sure you are searching in the right place?
Save the search (AdvancedSearch.Save - that will create a search folder) and look at it with OutlookSpy (click IMsgStore button, select PR_FINDER_ENTRYID, right click, select IMAPISession::OpenEntry, in the IMAPIFolder window go to the GetHierarchyTable tab, open the new search folder, in the new IMAPIFolder window go to the GetSearchCriteriaTab. What do you see? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Andrew Lockwood" wrote in message ... Thanks - but it doesn't work! It doesn't cause a crash like some of the options I have tried, so presumably this means that the filter is formatted in an acceptable way, but the search takes quite a long time and returns nothing! Whereas if I create a SearchFolder within Outlook using the same substring, it works perfectly and takes about 1 second! Andrew Lockwood "Dmitry Streblechenko" wrote in message ... ' "urn:schemas:httpmail:subject" LIKE ''%MySubString%'' ' -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Andrew Lockwood" wrote in message ... I am trying to create a COM AddIn in Delphi, and I want to use the AdvancedSearch functionality of Outlook. If I am searching on the whole field, the following code works correctly 'urn:schemas:httpmail:subject = ' + QuotedStr(MyString) From Outlook, I have determined that to search on a substring, the code in VBA would be "urn:schemas:httpmail:subject" LIKE '%MySubString%' However, I have been unable to translate this successfully into Delphi. Can anyone help? Andrew Lockwood |
#5
|
|||
|
|||
![]()
Thanks - I got it working in the end. However, I changed so many things in
the attempt, that I do not actually know where the problem was. Andrew Lockwood "Dmitry Streblechenko" wrote in message ... Are you sure you are searching in the right place? Save the search (AdvancedSearch.Save - that will create a search folder) and look at it with OutlookSpy (click IMsgStore button, select PR_FINDER_ENTRYID, right click, select IMAPISession::OpenEntry, in the IMAPIFolder window go to the GetHierarchyTable tab, open the new search folder, in the new IMAPIFolder window go to the GetSearchCriteriaTab. What do you see? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Andrew Lockwood" wrote in message ... Thanks - but it doesn't work! It doesn't cause a crash like some of the options I have tried, so presumably this means that the filter is formatted in an acceptable way, but the search takes quite a long time and returns nothing! Whereas if I create a SearchFolder within Outlook using the same substring, it works perfectly and takes about 1 second! Andrew Lockwood "Dmitry Streblechenko" wrote in message ... ' "urn:schemas:httpmail:subject" LIKE ''%MySubString%'' ' -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Andrew Lockwood" wrote in message ... I am trying to create a COM AddIn in Delphi, and I want to use the AdvancedSearch functionality of Outlook. If I am searching on the whole field, the following code works correctly 'urn:schemas:httpmail:subject = ' + QuotedStr(MyString) From Outlook, I have determined that to search on a substring, the code in VBA would be "urn:schemas:httpmail:subject" LIKE '%MySubString%' However, I have been unable to translate this successfully into Delphi. Can anyone help? Andrew Lockwood |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how can I search a substring in Outlook emails? | David Outlook Newbie | Outlook - General Queries | 4 | September 17th 08 05:50 PM |
Subject field type change? | MHull69 | Outlook - Using Forms | 5 | January 19th 07 10:14 PM |
Outlook Form and the Subject Field | roblowein | Outlook - General Queries | 1 | January 4th 07 05:30 PM |
Automatic Text in Subject Field | Dries Goossens | Outlook and VBA | 1 | October 10th 06 07:58 AM |
Edit Subject Field | Meeme | Outlook - Calandaring | 2 | April 18th 06 02:59 PM |