Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On a form in Excel (2003) I have a button to "Add a New Contact". The
idea is to open Outlook at an empty contacts entry, allow the user to add/make changes and return to Excel. On returning I would resynchronize between Outlook and Excel. But... while the display of the Add Contact window in Outlook works fine the code drops through, past the "objCItem.Display" line and continues merrily on to the rest of the routine. That is, it does not stop and wait for the contact to be created or closed from the Outlook window. I would prefer a more 'Modal' behavior and wait before continuing with the Excel-VBA routine. What would be a good item/variable/object to wait on just after the display? I could put up a simple MSGBOX but that seems a little hokey. - - - - - Private Sub TestNewContact() 'Create objAppOL & objNS (late binding) Call StartOutlook 'Create a new, empty, contact entry Set objCItem = objAppOL.CreateItem(olContactItem) 'Put in here (just to prove I can write to it) objCItem.CustomerID = 0 objCItem.Display 'Display it ' ***** Want to wait here ***** Call SynchContacts 'Resynch between OL & XL End Sub - - - - - |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel-Outlook Contact List | Excel Discussion (Misc queries) | |||
Outlook contact linked to name in Excel | Excel Discussion (Misc queries) | |||
How can I link to an Outlook Contact from an Excel cel? | Excel Discussion (Misc queries) | |||
create outlook contact from excel | Excel Discussion (Misc queries) | |||
export excel file to outlook express contact list | New Users to Excel |