Loop mail items within a Custom Search Folder

Status
Not open for further replies.
S

Simon

Hi I'm using Outlook 2003.

From within a custom search folder, I'm wanting to loop through all mail

items and save each item in HTML format to a fixed directory (say "

H:\Blue").

I'm having problems trying to work out how to call the custom search folder

(lets say its called "Platinum")

Clearly I cant use Set mpfInbox =

myOlApp.GetNamespace("MAPI").GetDefaultFolder(olFolder etc etc)

I've found very little information on doing this...any idea?
 
K

Ken Slovak - [MVP - Outlook]

How is this search folder created? If it's by code using the

Application.AdvancedSearch() method then when it's first being created and

saved you get back a MAPIFolder reference for that search folder. You can

then save the EntryID of that MAPIFolder and use that to get back the folder

at any subsequent time by using NameSpace.GetFolderFromID().

Otherwise there's no access to search folders in the Outlook object model

until Outlook 2007 or by using Redemption or some other API that lets you

access the Store object and dig down from there to the search folders.

"Simon" <s1mon.forer@bigpond.com> wrote in message

news:A8C85B47-2D8C-4F71-BCFD-6DDE1D9B595D@microsoft.com...
> Hi I'm using Outlook 2003.

> From within a custom search folder, I'm wanting to loop through all mail
> items and save each item in HTML format to a fixed directory (say "
> H:\Blue").

> I'm having problems trying to work out how to call the custom search
> folder (lets say its called "Platinum")

> Clearly I cant use Set mpfInbox =
> myOlApp.GetNamespace("MAPI").GetDefaultFolder(olFolder etc etc)

> I've found very little information on doing this...any idea?
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A VBA macro for 15 second loop in send and received just for 1 specific mailbox Outlook VBA and Custom Forms 1
A ItemAdd on Imap Folder get endless loop after saving item Using Outlook 5
makinmyway Trouble Installing BCM Outlook 2013; Endless Install Loop Happens Using Outlook 0
W Broken Folder Loop - Outlook 2007 (.oft files) Using Outlook 2
R I was syncing my phone and outlook and it seams that my phone created thousands of contact in outlook (A loop maybe) Using Outlook 1
Forum Admin Endless loop when to the new Outlook Connector Using Outlook.com accounts in Outlook 0
S Business Contact Manager (BCM) causing Outlook crash loop BCM (Business Contact Manager) 3
K loop through distribution group (and potentially, embedded DGs) by Outlook VBA and Custom Forms 1
H For Each loop not getting all Email Items Outlook VBA and Custom Forms 3
M If loop not running Outlook VBA and Custom Forms 1
M Outlook VBA Form not finding FOR LOOP -- Error message Outlook VBA and Custom Forms 2
R Loop Attachment (once again) Outlook VBA and Custom Forms 6
L Correct E-Mail Pulling Wrong Mail Using Outlook 5
S Outlook mail adressing stops after first match in GAL Using Outlook 0
P Outlook 2013 All imported Mail Rules in error when imported into new profile Using Outlook 5
S Outlook Macro to send auto acknowledge mail only to new mails received to a specific shared inbox Outlook VBA and Custom Forms 0
S Outlook Macro to move reply mail based on the key word in the subjectline Outlook VBA and Custom Forms 0
MrMayor SENT mail not reloading to top?? Using Outlook 4
Terry Sullivan Sender Field Displays My E-Mail Address, Not My Name Using Outlook 1
ThinkToday Calculate reply time of outlook mail Using Outlook 1
B Outlook 2010 Opening Mail Attachment Using Outlook 2
e_a_g_l_e_p_i Is it possible it set the fonts used to read incoming mail Using Outlook 25
D Mail in Sent Items Gone Using Outlook 12
M Managing Gmail "All Mail" sync issues with IMAP Using Outlook 1
GregS Outlook 2016 Sent Mail absent from Sent Mail or Sent Items Folders Using Outlook 4
GregS Why is Outlook 2016 mail in Outlook.com? Using Outlook 1
S Outlook not receiving mail Using Outlook 1
Commodore Outlook (2013) issues with icloud.com mail Using Outlook 0
GregS Outlook 2016 iPhone won't download Outlook 2016 Mail. Using Outlook 0
A Arthur needs help with 2007 Outlook e-mail Using Outlook.com accounts in Outlook 3
oliv- How to distinguish whether mail is incoming or outgoing? Outlook VBA and Custom Forms 2
W Receiving mail for account that has been deleted Using Outlook 2
H In outlook 365 POP mail Inbox, email takes a long time or never arrives. Using Outlook 1
Z Add text to auto-forwarded e-mail Outlook VBA and Custom Forms 4
K HOW TO FIX AOL MAIL ISSUES? Using Outlook 0
O How to prevent CC from showing when creating a new mail? Using Outlook 1
I Junk Mail and PersonMetadata Using Outlook 2
T 3 months of archived e-mail is missing Using Outlook 1
B Outlook - Mail from safe senders list being sent to Spam Folder Using Outlook 0
G Detect Google Drive and OneDrive links in incoming mail Outlook VBA and Custom Forms 3
M Sent mail not showing in Sent Items folder; but they can be found with Search Using Outlook 3
H Outlook 2016 sent over 30 copies of an e-mail with attachments Using Outlook 1
T Missing text in e-mail message after "(Please keep confidential)" Using Outlook 3
Victor_50 Outlook 2013 Custom Contact Form starts with "E-mail 2" Outlook VBA and Custom Forms 2
E Mail sorting view issue Using Outlook 1
D after delete mail, open the next one Outlook VBA and Custom Forms 0
RBLampert Assigning a newly (re)created e-mail account to a specific .pst data file Using Outlook 2
B Clear Offline Items (Mail Folder) via VBA Outlook VBA and Custom Forms 1
M Moving mail to another folder is much slower than before (Office365) Using Outlook 0
A Outlook macro to create search folder with mail categories as criteria Outlook VBA and Custom Forms 3

Similar threads

Top