WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Select Alternate profile

 
   Home -> Office -> Programming VBA RSS
Next:  change of cells address  
Author Message
Mark Parent

External


Since: Mar 07, 2007
Posts: 6



(Msg. 1) Posted: Sun Sep 06, 2009 9:23 am
Post subject: Select Alternate profile
Archived from groups: microsoft>public>outlook>program_vba (more info?)

In my Outlook, under File - Open, I can see two Profiles.
Parent, Mark (Inbox)
Alternate, TD (Inbox)
The folders that appear only show those under Parent, Mark but if I select
the Alternate profile, I can read the Alternate inbox.

I need my VBA code to select the Alternate profile, and read that Inbox
contents. My code appears below; the Set REPRICE statement is failing. Can
I not select the Alternate Profile this way?

Set objApp = GetObject(, "Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set REPRICE = objNS.Folders.Item("Alternate, TD")
Set MyFolder = REPRICE.Folders.Item("Inbox")

Thanks all for your time and assistance!
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2977



(Msg. 2) Posted: Tue Sep 08, 2009 10:38 am
Post subject: Re: Select Alternate profile [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

What you are referring to as profiles sound like delegate mailboxes. Are you
on Exchange server, and is Alternate an Exchange mailbox? If that's the case
then you would use the NameSpace.GetSharedDefaultFolder() method to access
that Inbox.

See the Object Browser help on that method for an example of how to use it.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mark Parent" <MarkParent.TakeThisOut@discussions.microsoft.com> wrote in message
news:96B8980D-5690-4DB8-AFCA-DF707E5FD055@microsoft.com...
> In my Outlook, under File - Open, I can see two Profiles.
> Parent, Mark (Inbox)
> Alternate, TD (Inbox)
> The folders that appear only show those under Parent, Mark but if I select
> the Alternate profile, I can read the Alternate inbox.
>
> I need my VBA code to select the Alternate profile, and read that Inbox
> contents. My code appears below; the Set REPRICE statement is failing.
> Can
> I not select the Alternate Profile this way?
>
> Set objApp = GetObject(, "Outlook.Application")
> Set objNS = objApp.GetNamespace("MAPI")
> Set REPRICE = objNS.Folders.Item("Alternate, TD")
> Set MyFolder = REPRICE.Folders.Item("Inbox")
>
> Thanks all for your time and assistance!
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support