Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question Automate Outlook meetings from Excel VBA

More
13 years 2 months ago - 12 years 11 months ago #1 by roller
Let's say you want to create an Outlook meeting item from Excel and send the meeting invite to someone, the below code sample does just that. I use this script to book multiple meetings at different times with different staff in one go by looping thru a list and getting the required values from an Excel sheet. I made it for the call centre training staff to use to book feedback sessions with the helpdesk staff. But in my example I kept it simple to demonstrate the method, I am only booking one meeting.

You need to add reference to the Outlook object first then copy the code below in a module and run it. This will create a meeting item with Edgar Badawy on the 24/4/10 with 15 minutes duration and set the reminder to 5 minutes before the meeting. The meeting will be displayed and not sent, toggle the boolean to true in the IF statement to send it without displaying.

Sub app()
Dim a As Outlook.AppointmentItem
Dim wk As Worksheet


Set a = Outlook.CreateItem(olAppointmentItem)
a.Start = "24/04/2010 14:00"
'a.End = "4/2/10 17:00"
a.Duration = "15"
a.Body = "meeting with me"
a.Location = "myOffice"
a.ReminderMinutesBeforeStart = "5"
a.ReminderSet = True
a.RequiredAttendees = "Badawy, Edgar"
a.MeetingStatus = olMeeting
a.ResponseRequested = 1
a.Subject = "feedback session"

If False Then
a.Close olSave
a.Send
Else
a.Save
a.Display
End If




Set a = Nothing
Set wk = Nothing


End Sub
Last edit: 12 years 11 months ago by roller.

Please Log in or Create an account to join the conversation.

Time to create page: 1.437 seconds
Powered by Kunena Forum