Access 2010 ..
ok guys when I type the following
4it spanners out on top line on
Application.sessions.accounts
(its the sessions - its not seeing - )
what/where have I goofed ?
(the intention is to set the getdefaultfolder to the account I need as I have two accounts and this looks like it will "default " to what ever account I want - )
I've added the code tags for you! Don't you think it looks better!
pinched from
picked
ok guys when I type the following
4it spanners out on top line on
Application.sessions.accounts
(its the sessions - its not seeing - )
what/where have I goofed ?
(the intention is to set the getdefaultfolder to the account I need as I have two accounts and this looks like it will "default " to what ever account I want - )
I've added the code tags for you! Don't you think it looks better!
Code:
For Each oAccount In Application.Session.Accounts
If oaccount ="1@email.com" then
Set store = oaccount.DeliveryStore
Set folder = store.GetDefaultFolder(olFolderInbox) 'here it selects the inbox folder of account.
For each item in folder.items
' Code goes here
next
end if
next
VBA to select mailbox if an account has multiple mailbox's
social.msdn.microsoft.com
picked
Last edited by a moderator: