Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    New Zealand
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Accessing Data Files other than the default (2002)

    Hi,
    I am trying to use VBA to iterate through a folder of contacts in a pst file other than the default. The other data file is open in Outlook and has the name 'Archives'.
    To access the main file I have been using the following code:
    Dim oContact As Outlook.ContactItem
    Dim oNamespace As Outlook.NameSpace
    Set oNamespace = oOut.GetNamespace("MAPI")
    Dim oFolder As Outlook.MAPIFolder
    Set oFolder = oNamespace.GetDefaultFolder(Outlook.OlDefaultFolde rs.olFolderContacts)

    How would I alter this code to access the contacts folder in the other Data File i.e. Archives|Contacts.

    Thanks in advance.
    Simon Lampen

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Accessing Data Files other than the default (2002)

    Take a look at this thread for suggestions and code snippets: Email folders & subfolders? (2002)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •