Hello,
I have this problem:
I am working with Microsoft Outlook 2003.
I developed a visual basic program (coding below). This program creates
and
saves an Outlook appointment and displays the appointment on the screen.
My question:
How can I change my Visual Basic program so that it waits until the is
closed by the user? After the user has closed the appointment the program
shall continue.
Is this possible to do?
Thanks in advance!
Andy
Visual Basic Coding
[CODE]
Sub TermineAnlegen(Pfad As String)
Dim i As Long
Dim objOutlook as Object
Dim objTermin As Outlook.AppointmentItem
Dim apptTitel As String
Dim apptStartDatum As Date
Dim apptEndDatum As Date
Dim apptOrt As String
Set objOutlook = GetObject(, "Outlook.Application")
Set objTermin = objOutlook.CreateItem(1)
objTermin.Subject = apptTitel
objTermin.Start = apptStartDatum
objTermin.End = apptEndDatum
objTermin.Location = apptOrt
'Save appointment
'----------------
objTermin.Save
'Display appointment
'---------------
objTermin.Display
'>>>>THE PROGRAM SHALL WAIT NOW
'>>>>UNTIL THE APPOINTMENT IS CLOSED<<<<
Set objAnhang = Nothing
Set objTermin = Nothing
Set objOutlook = Nothing
End Sub
[/CODE]