I am using VBA in excel to send Outlook Meeting Requests. The coding works perfectly for sending the requests, so there are no issues with the actual macro.
My issue is directing the macro to select the last edited cell in Columns B, C, D, etc to prefill the meeting request. Currently I'm just copying the last edited cells to B1, C1, D1, E1, and F1, but I wish I could just direct the program to look at the bottom of the spreadsheet.
The code is as follows:
Sub SendMeetingRequest()
Dim olApp As Outlook.Application
Dim olApt As AppointmentItem
Set olApp = New Outlook.Application
Set olApt = olApp.CreateItem(olAppointmentItem)
With olApt
.Start = Range("F2") + Range("G2")
.End = .Start + TimeValue("00:30:00")
.Subject = Range("B2") + Range("C2") + Range("D2")
.Location = ""
.Body = Range("E2")
.BusyStatus = olBusy
.ReminderMinutesBeforeStart = 30
.ReminderSet = True
.RequiredAttendees = "email@emailaddress.com"
.Send
End With
Set olApt = Nothing
Set olApp = Nothing
End Sub
Bookmarks