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 make this code map to an inbox in additional mailbox?

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



Joined: 25 Feb 2008
Posts: 2

PostPosted: Tue Feb 26, 2008 4:22 am    Post subject: how to make this code map to an inbox in additional mailbox? Reply with quote

Below is the code I have that maps to the default inbox in outlook. Does
anyone know how to reference and inbox in an additional mailbox?

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

Thanks,

--
Bill Bray

Archived from group: microsoft>public>vb>syntax
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 Syntax 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