I'm trying to send an Outlook Calendar Invite. I cannot identify the email of the recipient in the "To" field. Despite referring to the field I want, the request always populates my e-mail address (the sender). How do I fix? I've looked and looked without success.
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.AppointmentItem
Set OutApp = New Outlook.Application
Set OutMail = OutApp.CreateItem(olAppointmentItem)
stRecipient = [SubjectEMail]
With OutMail
.MeetingStatus = olMeeting
.Location = " happening"
.Subject = " Event check "
.Start = "8:00 PM" & Format(Date)
.End = "9:00 PM" & Format(Date)
.Body = "this is event details"
.RequiredAttendees = stRecipient
.Display
' .Send
End With
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.AppointmentItem
Set OutApp = New Outlook.Application
Set OutMail = OutApp.CreateItem(olAppointmentItem)
stRecipient = [SubjectEMail]
With OutMail
.MeetingStatus = olMeeting
.Location = " happening"
.Subject = " Event check "
.Start = "8:00 PM" & Format(Date)
.End = "9:00 PM" & Format(Date)
.Body = "this is event details"
.RequiredAttendees = stRecipient
.Display
' .Send
End With