Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Suspend code
I have a procedure that sends e-mails automatically unless
the recipient is not found in which case the following procedure is called: Public Function enameadd() Workbooks("file").Close savechanges:=False Dim appoutlook As New Outlook.Application Dim nsoutlook As NameSpace Dim mfContacts As MAPIFolder Dim ciContact As ContactItem ' open outlook contacts Set nsoutlook = appoutlook.GetNamespace("Mapi") Set mfContacts = nsoutlook.GetDefaultFolder (olFolderContacts) 'find the contact Set ciContact = mfContacts.Items.Find("[FullName] = " & strEname) If ciContact Is Nothing Then Set ciContact = mfContacts.Items.Add ciContact.FullName = strEname End If 'open outlook form ciContact.Display Xlautoupdate 'resends email when recipient is added. End Function Control is passed back to the Xlautoupdate and the email is resent. Is it possible to hold the flow of the procedure until after the contact form has closed, at the moment the procedure resends before the contact form is closed. Thanks John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
suspend auto increment | Excel Discussion (Misc queries) | |||
Suspend calc of formula using a non-existent sheet | Excel Discussion (Misc queries) | |||
Screen suspend | Excel Programming | |||
Suspend/resume running of a macro | Excel Programming | |||
Suspend viewing of macros | Excel Programming |