StillUnderstanding
Board Regular
- Joined
- Jan 30, 2021
- Messages
- 80
- Office Version
- 365
- Platform
- Windows
- MacOS
So I seen a great bit of code to create an outlook cal appointment and then another bit of code to then add a teams invite. Code below.
I was wondering if anyone would know how to convert this to then create a teams chat based on email addresses in a specified cell?
I was wondering if anyone would know how to convert this to then create a teams chat based on email addresses in a specified cell?
VBA Code:
Sub new_teams_meeting
'Create place to store meeting
Dim newmeeting As Outlook.AppointmentItem
Dim meetingparticipants As Outlook.Recipient
'Creates a new calendar appointment
Set newmeeting = Application.CreateItem(olAppointmentItem)
'Change from calendar to meeting
newmeeting.MeetingStatus = olMeeting
'Set the email subject as value in class
newmeeting.Subject = "Subject"
'Set start date/time
newmeeting.Start = #Start date and time#
'Set end date/time
newmeeting.End #End date and time#
'Add target email
Set meetingparticipants = ListOfEmails
'Set meeting as required attendance or optional
meetingparticipants.Type = olRequired
newmeeting.Body = "Set the body of the email"
'Show the meeting
newmeeting.Display
'Switch on tab keyboard short cuts
SendKeys "{F10}", True
'Switch to ribbon shortcuts
SendKeys "H", True
'Hit the Microsoft teams meetings button, requires teams to be installed
SendKeys "TM", True
'Now to add signature: Switch to meeting location button
SendKeys "{Tab}", True
'Switch to email body
SendKeys "{Tab}", True
'Highlight all the text
SendKeys "^+{END}", True
'Go to end of text so that the signature is at the bottom
SendKeys "{END}", True
'turn on tab shortcuts
SendKeys "{F10}", True
'select the Insert tab
SendKeys "N", True
'Open the signature drop down
SendKeys "AS", True
'Select first signature and close signature list
SendKeys "{ENTER}"
End Sub