My vba applet creates a new appointment request with the following code with a series of email addresses in column(1) on the activesheet:
Dim allAddress
Dim lrow As Integer, x As Integer, i As Integer
lrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).row
allAddress = ActiveSheet.Cells(1, 1).Value
For x = 2 To lrow
allAddress = allAddress & "; " & ActiveSheet.Cells(x, 1).Value
Next x
Dim objApplication As Object 'Outlook Application Object
Set objApplication = CreateObject("Outlook.Application")
Dim objAppointment As Object 'AppointmentItem Item
Set objAppointment = objApplication.CreateItem(1)
'Appointment properties
objAppointment.Location = "Steve's Office"
objAppointment.Start = Now + 1
objAppointment.Duration = 60
objAppointment.Subject = "Study Meeting"
objAppointment.RequiredAttendees = allAddress
objAppointment.display
Which works just fine as far as I can tell.
But instead of opening to the Appointment display view I would like it to open to the Scheduling Assistant display view by default instead but nothing I've tried so far seems to want to work.
And since this will eventually be a distributed solution I would like to avoid having to add the Microsoft Outlook 15.0 Object Library so early binding solutions won't work here.
Any help would be most appreciated.
(Edit: I cross-posted this over at the Outlook MSDN site. If a solution or at least some sytax pops up over there I'll add it to here as well).
https://social.msdn.microsoft.com/Fo...rum=outlookdev
[edit] Solved. Added:
'Switch to the Scheduling Assistant tab in that inspector.
Dim oInsp As Object
Set oInsp = objAppointment.GetInspector
oInsp.SetCurrentFormPage ("Scheduling Assistant")
It was the GetInspector part I was missing entirely.
Bookmarks