Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Weary Traveler Needs Assistance: Change Focus to Outlook Contacts
I'm trying to give the user a button to push in a spreadsheet to simply
change focus to Outlook Contacts. Everything seems to work except the very last command - the one to change focus. What am I missing? Here's what I've got so far: Dim ObjOutlook As Outlook.Application Dim bWasntRunning As Boolean bWasntRunning = False On Error Resume Next ' Try first to use an existing instance. Set ObjOutlook = GetObject(, "Outlook.Application") If Err Then ' Outlook isn't running, so start it. bWasntRunning = True Set ObjOutlook = CreateObject("Outlook.Application") End If Set objnamespace = ObjOutlook.GetNamespace("MAPI") Set objFolder = objnamespace.GetDefaultFolder(olFolderContacts) ' This stmt does set objFolder to "Contacts" objFolder.Display 'This creates a new instance of Outlook 'regardless of whether one is already 'open or not. Take this out, and I get no 'change of focus to Outlook Contacts. Any help would be greatly appreciated. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Importing Excel database into Outlook Contacts says "No Named Rang | Excel Discussion (Misc queries) | |||
Can I connect data from Outlook contacts to cells within Excell? | Excel Worksheet Functions | |||
How do i export excel data to outlook contacts | Excel Discussion (Misc queries) | |||
Excell linked to outlook contacts | Excel Worksheet Functions | |||
Using excel to modify a CSV for internatilising outlook contacts | Excel Discussion (Misc queries) |