Push Button in Outlook to Change Focus to Outlook Contact List

C

Cole

Hi folks,

I don't do much with VBA, so any EXPLICIT help is greatly appreciated.

I'm trying to push a button in Excel and have it:
See if Outlook is already started. If not - start it up.
Change focus to the Outlook Contacts page.

I've looked at several postings in this group and tried some stuff, but
nothing seems to work, thus far. Here is what I tried (Commented out
cause it didn't work.)

'Dim IsItRunning As Boolean

' On Error Resume Next
' whichprogram = GetObject(, "Outlook.Application")
' If whichprogram = "Outlook" Then IsItRunning = True Else
IsItRunning = False
' Err.Clear
' If WhichProgram = "Outlook" Then IsItRunning = True
' If IsItRunning = False Then
' Dim RetVal
' RetVal = Shell("C:\Program Files\Microsoft
Office\Office11\Outlook.EXE", 6)
' End If

AND I TRIED THE FOLLOWING:

' Dim objOutlook As Object
' Dim objPhonelist As Object
' Dim olNameSpace As Object

'''Set the reference to the Outlook object model
' On Error Resume Next
' ThisWorkbook.VBProject.References.AddFromFile Application.Path & _
' "\00SVO\Company Directory\Company Phone Numbers"
' On Error GoTo 0

'''Create the Outlook object
' Set objOutlook = CreateObject("Outlook.Application")

'''Get Outlook's work area
' Set olNameSpace = objOutlook.GetNamespace("MAPI")

'''Access and display the default Inbox folder
' Set objPhonelist = olNameSpace.GetDefaultFolder(objPhonelist)
' objInbox.Display

Thank you in advance for your help.

Kind regards,
Cole
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top