MS Excel/VBA Set up meeting appointment from Excel

NaiA7521

New Member
Joined
Feb 25, 2016
Messages
2
Hi,

I would be grateful for your help with the below bit of code. I am trying to set up Outlook appointment from Excel with: specified location, start and end time, reminder, and pre-defined lists of required and optional attendees. The code works in general, although I have issues fine-tuning it.

I cannot figure out how to set it up as an actual appointment - when I use anything else but olMeeting it stops working. Right now as meeting type list of attendees is hidden at first and you need to use 'Invite Attendees' in Outlook invite to unhide it and enable Send button, which is inconvenient for my purpose.

I am using O365, but the same is true for every version I tried this code on.

Here is my code. I am not providing actual values.


Dim Required_Attendees As String
Dim Optional_Attendees As String
Dim Meeting_StartDate As String
Dim Appointment_Body As String
Dim Meeting_Location As String
Dim Subject_Line As String

Dim OutApp As Object
Set OutApp = GetObject(, "Outlook.Application")
Dim OutItem As Object
Set OutItem = OutApp.CreateItem(1)

With OutItem
.RequiredAttendees = Required_Attendees
.optionalattendees = Optional_Attendees
.Start = Meeting_StartDate
.End = Meeting_EndDate
.Body = Appointment_Body
.Location = Meeting_Location
.AllDayEvent = False
.Subject = Subject_Line
.ReminderMinutesBeforeStart = 10
.ReminderSet = True
.MeetingStatus = olMeeting
.Display
End With

Set OutItem = Nothing
Set OutApp = Nothing
Application.ScreenUpdating = True


Thanks,

NaiA7521
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,223,275
Messages
6,171,126
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top