Loop through a folder and forward each email to a given address

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

I need the code to loop through a given folder, and forward each email to a
specific email address.

Could someone please help me with this code?

Thank you!
 
Am Tue, 31 Jan 2006 12:09:35 -0800 schrieb needsomeoutlookhelp:

dim oFld as Outlook.MapiFolder
dim obj as Object
Dim oMail as Outlook.MailItem

Set oFld =Application.Session.PickFolder
If not oFld is nothing then
For each obj in oFld.Items
If Typeof obj is Outlook.MailItem Then
Set oMail=obj.Forward
oMail.Recipients.Add "themailaddress"
oMail.Send
Endif
Next
Endif
 
Back
Top