Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a (Modal) version of File :: New :: Contact from Excel (into Outlook)

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
- - - - -

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel-Outlook Contact List [email protected] Excel Discussion (Misc queries) 1 July 9th 08 09:40 PM
Outlook contact linked to name in Excel bdesaul Excel Discussion (Misc queries) 2 January 28th 07 11:04 PM
How can I link to an Outlook Contact from an Excel cel? jasonh1234 Excel Discussion (Misc queries) 0 April 21st 06 08:28 PM
create outlook contact from excel Trefor Excel Discussion (Misc queries) 2 September 21st 05 03:01 PM
export excel file to outlook express contact list gebhardt family New Users to Excel 0 January 20th 05 11:59 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"