I
ID10Terror
Hi:
I am using Outlook 2003 and have a problem. I need to manage about 5
different email accounts (addresses) and I am considering using Outlook to
do that. Let's say I have 5 email accounts (Doe1 thru Doe5). Looking at
"All Mail Folders", each folder is fairly equivilant to "Personal Folders".
I am using Access 2003 to open emails, download into a table, and then move
the email to a sub folder. Because I am using code, I am lost on how to
access each "Inbox" folder through code. As an example, if I want to use
this code to access the folder "Doe2 - Inbox", how do I set this code for
the default folder for that?
Access 2003 Code:
'
Dim Olapp As Outlook.Application
Dim Olmapi As Outlook.NameSpace
Dim Olfolder As Outlook.MAPIFolder
Dim OlAccept As Outlook.MAPIFolder
Dim OlDecline As Outlook.MAPIFolder
Dim OlFailed As Outlook.MAPIFolder
Dim OlMail As Object ' Have to late bind as appointments e.t.c screw it up
Dim OlItems As Outlook.Items
Dim OlRecips As Outlook.Recipients
Dim OlRecip As Outlook.Recipient
Dim Rst As Recordset
'
Set Rst = CurrentDb.OpenRecordset("tblSomething")
Set Olapp = CreateObject("Outlook.Application")
Set Olmapi = Olapp.GetNamespace("MAPI")
Set Olfolder = Olmapi.GetDefaultFolder(olFolderInbox) <---- ???
here, and to what ???
Set OlItems = Olfolder.Items
Set OlAccept = Olfolder.Folders("Passed")
Set OlFailed = Olfolder.Folders("Failed")
Because I have 5 accounts, I have to change the default folder for each one
through code.
TIA
I am using Outlook 2003 and have a problem. I need to manage about 5
different email accounts (addresses) and I am considering using Outlook to
do that. Let's say I have 5 email accounts (Doe1 thru Doe5). Looking at
"All Mail Folders", each folder is fairly equivilant to "Personal Folders".
I am using Access 2003 to open emails, download into a table, and then move
the email to a sub folder. Because I am using code, I am lost on how to
access each "Inbox" folder through code. As an example, if I want to use
this code to access the folder "Doe2 - Inbox", how do I set this code for
the default folder for that?
Access 2003 Code:
'
Dim Olapp As Outlook.Application
Dim Olmapi As Outlook.NameSpace
Dim Olfolder As Outlook.MAPIFolder
Dim OlAccept As Outlook.MAPIFolder
Dim OlDecline As Outlook.MAPIFolder
Dim OlFailed As Outlook.MAPIFolder
Dim OlMail As Object ' Have to late bind as appointments e.t.c screw it up
Dim OlItems As Outlook.Items
Dim OlRecips As Outlook.Recipients
Dim OlRecip As Outlook.Recipient
Dim Rst As Recordset
'
Set Rst = CurrentDb.OpenRecordset("tblSomething")
Set Olapp = CreateObject("Outlook.Application")
Set Olmapi = Olapp.GetNamespace("MAPI")
Set Olfolder = Olmapi.GetDefaultFolder(olFolderInbox) <---- ???
here, and to what ???
Set OlItems = Olfolder.Items
Set OlAccept = Olfolder.Folders("Passed")
Set OlFailed = Olfolder.Folders("Failed")
Because I have 5 accounts, I have to change the default folder for each one
through code.
TIA