+ Reply to Thread
Results 1 to 10 of 10

Specifying which account on outlook to interrogate

  1. #1
    Registered User
    Join Date
    10-11-2011
    Location
    Portsmouth
    MS-Off Ver
    Excel 2003
    Posts
    9

    Specifying which account on outlook to interrogate

    Hello guys,

    Below is a snippet of code I'm working with. This works fine except when I'm setting the NameSpace I'm setting up the MAPI folders I am always using the default folder which I am assuming is pointing the default e-mail account. Is there anyway of pointing it to a specific account?

    I've already got code in place that gets the names of all the accounts and populates a drop down for users to select I just don't know how to use it to get a list of folders in that account.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Specifying which account on outlook to interrogate

    Have you tried the Namespace's Logon method?
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    10-11-2011
    Location
    Portsmouth
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Specifying which account on outlook to interrogate

    Quote Originally Posted by romperstomper View Post
    Have you tried the Namespace's Logon method?
    I've just tried that but don't seem to be getting any joy. I might be making the wrong call to the namespace afterwards as all I'm getting are the accounts.

    Please Login or Register  to view this content.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Specifying which account on outlook to interrogate

    Why did you change the rest of the code?

  5. #5
    Registered User
    Join Date
    10-11-2011
    Location
    Portsmouth
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Specifying which account on outlook to interrogate

    Sorry the first one I sent was working so albeit just with the default account so I didn't want to mess with it.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Specifying which account on outlook to interrogate

    So have you tried adding the Logon code to it?

  7. #7
    Registered User
    Join Date
    10-11-2011
    Location
    Portsmouth
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Specifying which account on outlook to interrogate

    Quote Originally Posted by romperstomper View Post
    So have you tried adding the Logon code to it?
    I have and it's still only picking up my default account.

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Specifying which account on outlook to interrogate

    Please Login or Register  to view this content.



  9. #9
    Registered User
    Join Date
    10-11-2011
    Location
    Portsmouth
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Specifying which account on outlook to interrogate

    Thanks snb but won't that just bring back the accounts? Either way I've stumbled upon this

    Please Login or Register  to view this content.

  10. #10
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Specifying which account on outlook to interrogate

    Yes, but the next step is:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1