Hi,
I am currently using:
Cells(ActiveCell.Row, "F").Value
Which is "John Doe" but I only want it to display the second word "Doe"
I also have
Cells(ActiveCell.Row, "A").Value
Which is "SMITH RODGERS, Jane" but I only want it to display the words that appear before the "," so it displays "SMITH RODGERS"
The full code is:
Thanks in advance
I am currently using:
Cells(ActiveCell.Row, "F").Value
Which is "John Doe" but I only want it to display the second word "Doe"
I also have
Cells(ActiveCell.Row, "A").Value
Which is "SMITH RODGERS, Jane" but I only want it to display the words that appear before the "," so it displays "SMITH RODGERS"
The full code is:
VBA Code:
Option Explicit
Sub CalendarInvite()
Dim OutApp As Outlook.Application, Outmeet As Outlook.AppointmentItem
Set OutApp = Outlook.Application
Set Outmeet = OutApp.CreateItem(olAppointmentItem)
With Outmeet
.MeetingStatus = olMeeting
.ReminderMinutesBeforeStart = 15
.Subject = "Support: " & Cells(ActiveCell.Row, "F").Value & " Client: " & Cells(ActiveCell.Row, "A").Value & " - BOOKED"
.Body = Cells(ActiveCell.Row, "J").Value
.Location = Cells(ActiveCell.Row, "H").Value
.Start = Cells(ActiveCell.Row, "B").Value
.AllDayEvent = True
.Display
End With
Set OutApp = Nothing
Set Outmeet = Nothing
End Sub
Thanks in advance