A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Select Alternate profile



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 6th 09, 05:23 PM posted to microsoft.public.outlook.program_vba
Mark Parent
external usenet poster
 
Posts: 3
Default Select Alternate profile

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!


Ads
  #2  
Old September 8th 09, 03:38 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Select Alternate profile

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" wrote in message
...
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!



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
alternate calendar Organization Freak Outlook - Calandaring 3 August 31st 09 04:07 PM
Outlook Create Message, Select To, Select Conacts- ...No Sort Opti Hyny Outlook - Using Contacts 1 July 9th 09 08:04 PM
Alternate Solution rlima@sbcglobal.net Outlook and VBA 1 July 16th 07 07:55 PM
Can you synchronize alternate calendars? Seawolf Outlook - Calandaring 2 September 27th 06 11:21 AM
2 emails in one profile, how to select witch to use Roger Payne Outlook - Installation 2 February 26th 06 12:17 PM


All times are GMT +1. The time now is 05:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.