![]() |
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
|
|||
|
|||
![]()
Hi!
I would like to know if there is any way to programatically create your own custom Search Folder from an Outlook add-in, and of course, add it's own search criteria (I would like to search after a custom fileld added in certain MailItems). Also, if this is possible, how do I access it afterwards? It doesn't matter if this is done via OOM, CDO or Redemption (or something else?)...is it possible? Thanks a lot, Doru |
#2
|
|||
|
|||
![]()
Use the Application.AdvancedSearch method to return a Search object, then use Search.Save to create the search folder. You will be able to use a custom field in the search criteria only if it is defined in the folder(s), not just in individual items.
FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/comm....program_v ba -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message oups.com... Hi! I would like to know if there is any way to programatically create your own custom Search Folder from an Outlook add-in, and of course, add it's own search criteria (I would like to search after a custom fileld added in certain MailItems). Also, if this is possible, how do I access it afterwards? It doesn't matter if this is done via OOM, CDO or Redemption (or something else?)...is it possible? Thanks a lot, Doru |
#3
|
|||
|
|||
![]()
Wow! That works like a charm! Thanks a lot!
![]() Search Folder, but I still don't understand if, and how can I: 1) programatically find it, 2) edit it if needed (i.e. if the user manually modified it in the mean time), 3) eventually delete it (will be needed on add-in uninstall). Thanks again, Doru |
#4
|
|||
|
|||
![]()
Since the Search.Save function returns a MAPIFolder object, you should be able to get that folder's EntryID at that point for later use with the Namespace.GetFolderFromID method.
You will not be able to edit the search folder settings programmatically. I think you'll be able to delete it, but I haven't tried it. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ups.com... Wow! That works like a charm! Thanks a lot! ![]() Search Folder, but I still don't understand if, and how can I: 1) programatically find it, 2) edit it if needed (i.e. if the user manually modified it in the mean time), 3) eventually delete it (will be needed on add-in uninstall). Thanks again, Doru |
#5
|
|||
|
|||
![]()
Yeah, you have to get it, delete it and then re-create it if you want to
change the filter. I've done that a lot. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Sue Mosher [MVP-Outlook]" wrote in message ... Since the Search.Save function returns a MAPIFolder object, you should be able to get that folder's EntryID at that point for later use with the Namespace.GetFolderFromID method. You will not be able to edit the search folder settings programmatically. I think you'll be able to delete it, but I haven't tried it. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx |
#6
|
|||
|
|||
![]()
Thanks a lot, guys! Seems easy now
![]() |
#7
|
|||
|
|||
![]()
What should be the scope for searching recursivelly in all personal
folders? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Create a search folder to look at all emails in one folder and selected criteria in other folders | [email protected] | Outlook - General Queries | 1 | April 10th 06 09:40 AM |
Search Folder Question Please | Bob Newman | Outlook - General Queries | 0 | April 2nd 06 03:34 PM |
search custom fields | student of science | Outlook - Using Forms | 2 | March 22nd 06 04:28 PM |
Which folder is the message in after search? | Gregg Hill | Outlook - General Queries | 2 | March 1st 06 07:50 AM |
Help me setup this custom search | [email protected] | Outlook - General Queries | 0 | January 23rd 06 05:18 PM |