msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to refrence the inbox of an additional mailbox in Outloo

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions
Author Message
bill



Joined: 25 Feb 2008
Posts: 2

PostPosted: Sun Feb 24, 2008 3:17 pm    Post subject: How to refrence the inbox of an additional mailbox in Outloo Reply with quote

I have this code to get to the default Outlook inbox but I would like to get
to the inbox of an additional added mailbox. Can this be done? Here is the
code I'm using below:
Dim objSession As MAPI.Session

Dim objInbox As MAPI.Folder

Dim objMessages As MAPI.Messages

Dim objMessage As MAPI.Message

Dim objEmbeddedMessage As MAPI.Message

Dim objNewMail As MAPI.Message

If cboFileType.SelectedIndex -1 Then

ListBox1.Items.Clear()

'create session and logon

objSession = CreateObject("MAPI.Session")

'Use this for non exchange outlook - objSession.Logon("Outlook")

objSession.Logon("Default Outlook Profile") 'works on Halliburton COE

' objSession.Logon()

'reference the messages in the inbox

objInbox = objSession.Inbox

objMessages = objInbox.Messages


--
Bill Bray

--
Bill Bray

Archived from group: microsoft>public>vb>general>discussion
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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


Powered by phpBB © 2001, 2005 phpBB Group