PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Accessing Multiple Inboxes w/ Session.Infostore Object

Reply

Accessing Multiple Inboxes w/ Session.Infostore Object

 
Thread Tools Rate Thread
Old 19-09-2003, 05:37 PM   #1
Ken Parchinski
Guest
 
Posts: n/a
Default Accessing Multiple Inboxes w/ Session.Infostore Object


I am trying to access multiple inboxes through my profile using the
session.infostore object so that I can set a message filter on the inbox to
determine the daily number of emails received. I am having difficult
associating an inbox folder for a given infostore to set the message filter.

Thanks in advance.

Ken

On Error GoTo ERR_ROUTINE
Set oSession = CreateObject("MAPI.Session")
oSession.Logon
For n = 1 To oSession.InfoStores.Count
Set oInfostore = oSession.InfoStores(n)
'Debug.Print oInfostore.Name, oInfostore.RootFolder.Name,
oInfostore.ProviderName
--> I am getting stuck here
Set oFolder = oSession.Inbox
Set oMessages = oFolder.Messages
Set oMessageFilter = oMessages.Filter
oMessageFilter.TimeFirst = "9/19/03"
Next




  Reply With Quote
Old 21-09-2003, 12:26 AM   #2
Sue Mosher [MVP]
Guest
 
Posts: n/a
Default Re: Accessing Multiple Inboxes w/ Session.Infostore Object

Inbox is an object property of the Session, not the Infostore. There's no guarantee that any given Infostore will even have an inbox. Aside from the default store, you'll need to get inboxes from other stores by name as a subfolder of the store's RootFolder folder.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Ken Parchinski" <kparchinski@callargi.com> wrote in message news:uxcnSxsfDHA.2576@TK2MSFTNGP11.phx.gbl...
> I am trying to access multiple inboxes through my profile using the
> session.infostore object so that I can set a message filter on the inbox to
> determine the daily number of emails received. I am having difficult
> associating an inbox folder for a given infostore to set the message filter.
>
> Thanks in advance.
>
> Ken
>
> On Error GoTo ERR_ROUTINE
> Set oSession = CreateObject("MAPI.Session")
> oSession.Logon
> For n = 1 To oSession.InfoStores.Count
> Set oInfostore = oSession.InfoStores(n)
> 'Debug.Print oInfostore.Name, oInfostore.RootFolder.Name,
> oInfostore.ProviderName
> --> I am getting stuck here
> Set oFolder = oSession.Inbox
> Set oMessages = oFolder.Messages
> Set oMessageFilter = oMessages.Filter
> oMessageFilter.TimeFirst = "9/19/03"
> Next
>
>
>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off