XelaIrodavlas
Registered User.
- Local time
 - Today, 09:11
 
- Joined
 - Oct 26, 2012
 
- Messages
 - 175
 
Hello,
I have code that prepares a calender appointment in Outlook (based on similar code for prewritten emails). I would like to check if the user actually clicked send, or if something stopped it. For emails there is mailitem.Sent, is there an equivalent for appointments?
AppointmentItem.MeetingStatus seems close, but I can't figure out a way to make it work.
Here's what I'm working with, note outMail.MeetingStatus is returning 1 regardless of whether i click send or cancel!
	
	
	
		
Any ideas would be much appreciated.
Edit: this is what I use to track Email items:
	
	
		
			
	
	
	
		
		
	
 I have code that prepares a calender appointment in Outlook (based on similar code for prewritten emails). I would like to check if the user actually clicked send, or if something stopped it. For emails there is mailitem.Sent, is there an equivalent for appointments?
AppointmentItem.MeetingStatus seems close, but I can't figure out a way to make it work.
Here's what I'm working with, note outMail.MeetingStatus is returning 1 regardless of whether i click send or cancel!
		Code:
	
	
	Dim outApp As Outlook.Application
Dim outMail As Outlook.AppointmentItem
Set outApp = CreateObject("Outlook.Application")
Set outMail = outApp.CreateItem(1)
'Script and display the Appointment:
With outMail
    .MeetingStatus = olMeeting
    .AllDayEvent = False
    .Start = Date + 3
    .Duration = 1440    '(Default unit = minutes)
    .Subject = vSubject
    .Body = "Appointment has been scheduled."
    .RequiredAttendees = "XelaIrodavlas"
    .Location = "Some Place"
    .OptionalAttendees = "Ann Other"
    .Display True
End With
debug.print outMail.MeetingStatus
	Any ideas would be much appreciated.
Edit: this is what I use to track Email items:
		Code:
	
	
	'Check if the email was sent or just closed
On Error Resume Next
vMsgSent = outMail.Sent '(Required to generate an error)
If Err = 0 Then
    'Message not sent
    TrackedEmail = False
Else
    'Message Was Sent
    TrackedEmail = True
End If
'Reset error handling
On Error GoTo Error_Handler
	
			
				Last edited: