Send Outlook appointment from Excel
Hi,
I'm stacked with the following issue:
I have some references, which creates the outlook appointment, but I am not able so send it. It only saves it on my Outlook calendar.
In fact, I would like just to send it, but not copy to my calendar, or send it, but delete from my calendar after, without sending notification.
Would you be so kind to help me with this?
The code is the following:
Sub AddAppointments()
Dim myoutlook As Object ' Outlook.Application
Dim myapt As Object ' Outlook.AppointmentItem
' Create the Outlook session
Set myoutlook = CreateObject("Outlook.Application")
Set myapt = myoutlook.CreateItem(1)
' Set the appointment properties
With myapt
.Subject = Range("H6")
.Start = Range("I7").Text & " " & Range("J7").Text
.End = Range("I8").Text & " " & Range("J8").Text
'.MeetingStatus = olMeeting
' not necessary if recipients are email addresses
.Recipients.ResolveAll
.AllDayEvent = False
.ReminderMinutesBeforeStart = 15
.Body = Range("H6")
.RequiredAttendees = Range("H5")
.Location = "at your desk"
.DISPLAY
.send
End With
End Sub
Thanks in advance.
|