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
Hallo Bill, sorry, you are in the wrong newsgroup this one is for Help Authoring, meaning the Help files associated with an application. But you might want to take a look at another newsgroups VB2005 (?): news://msnews.microsoft.com/microsoft.public.dotnet.framework.aspnet news://msnews.microsoft.com/microsoft.public.dotnet.languages.vb news://msnews.microsoft.com/microsoft.public.office.developer.vba or http://forums.microsoft.com/MSDN/default.aspx?SiteID=1 Search for Visual Basic Express -- Best regards Ulrich Kulle Microsoft MVP - Windows Help *********************************** http://www.help-info.de *********************************** "bill" schrieb im Newsbeitrag news:O2IqPcHgIHA.2540@TK2MSFTNGP05.phx.gbl... >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 >