Setting Appt/Meeting Request in Shared Calendar

  • Thread starter Joshua McLemore
  • Start date
J

Joshua McLemore

Hello,

I currently have a meeting request VBA code that is setting up appointments
in Outlook perfectly. Now, I'm trying to get it to schedule the appointments
in a specific shared calendar named "Production Services."

From what I gather, I'm going to have to use GetSharedFolder but I don't
have the slightest clue how to set that up. So any help would be greatly
appreciated!!

I'm using Access 2003 and this is setting up meeting requests in Outlook 2007.

Current Code:

Private Sub cmdOpenAppointment_Click()

DoCmd.OutputTo acOutputReport, "Rpt_Part 1 Details", acFormatSNP,
"C:\Program Files\Microsoft Office\MEDIA\Report1.snp", True
Me.AppointmentClickDate = Now()

Dim objOApp As New Outlook.Application
Dim objAppt As AppointmentItem
Dim oExp As Outlook.Explorer


Set objOApp = New Outlook.Application
Set objAppt = objOApp.CreateItem(olAppointmentItem)
Set oExp = objOApp.Session.GetDefaultFolder(olFolderInbox).GetExplorer

With objAppt
..RequiredAttendees = [Forms]![frmEvent_Part1_Details]![Audio Emails
Combined] & ";" & [Forms]![frmEvent_Part1_Details]![Lighting Emails Combined]
& ";" & [Forms]![frmEvent_Part1_Details]![Projection Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![StageHands Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![Camera Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![Additional Emails Combined]
..Subject = [Forms]![frmEvent_Part1_Details]![Name of Event] & " " &
[Forms]![frmEvent_Part1_Details]![Part Date Text]
..Importance = 1 ' Normal
..Start = [Forms]![frmEvent_Part1_Details]![Part Date Text] & " " &
[Forms]![frmEvent_Part1_Details]![Part Start Time Text]
..Location = [Forms]![frm All Events]![Part 1 Location]
..Attachments.Add "C:\Program Files\Microsoft Office\MEDIA\Report1.snp"
..Body = Nz([Forms]![frmEvent_Part1_Details]![Additional Part Notes Text],
vbCrLf) & vbCrLf & vbCrLf & vbCrLf
..MeetingStatus = 1
..ResponseRequested = True
..Save
..Send
MsgBox "Event Request Sent."
End With


Exit_btnSendItem_Click:
Set objOApp = Nothing
Set objAppt = Nothing
Set oExp = Nothing
Exit Sub

End Sub
 
J

Joshua McLemore

This is perfect. Thank you so very much!

--
Joshua


Sue Mosher said:
See if the code sample at http://www.outlookcode.com/codedetail.aspx?id=43
helps.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers




Joshua McLemore said:
Hello,

I currently have a meeting request VBA code that is setting up appointments
in Outlook perfectly. Now, I'm trying to get it to schedule the appointments
in a specific shared calendar named "Production Services."

From what I gather, I'm going to have to use GetSharedFolder but I don't
have the slightest clue how to set that up. So any help would be greatly
appreciated!!

I'm using Access 2003 and this is setting up meeting requests in Outlook 2007.

Current Code:

Private Sub cmdOpenAppointment_Click()

DoCmd.OutputTo acOutputReport, "Rpt_Part 1 Details", acFormatSNP,
"C:\Program Files\Microsoft Office\MEDIA\Report1.snp", True
Me.AppointmentClickDate = Now()

Dim objOApp As New Outlook.Application
Dim objAppt As AppointmentItem
Dim oExp As Outlook.Explorer


Set objOApp = New Outlook.Application
Set objAppt = objOApp.CreateItem(olAppointmentItem)
Set oExp = objOApp.Session.GetDefaultFolder(olFolderInbox).GetExplorer

With objAppt
.RequiredAttendees = [Forms]![frmEvent_Part1_Details]![Audio Emails
Combined] & ";" & [Forms]![frmEvent_Part1_Details]![Lighting Emails Combined]
& ";" & [Forms]![frmEvent_Part1_Details]![Projection Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![StageHands Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![Camera Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![Additional Emails Combined]
.Subject = [Forms]![frmEvent_Part1_Details]![Name of Event] & " " &
[Forms]![frmEvent_Part1_Details]![Part Date Text]
.Importance = 1 ' Normal
.Start = [Forms]![frmEvent_Part1_Details]![Part Date Text] & " " &
[Forms]![frmEvent_Part1_Details]![Part Start Time Text]
.Location = [Forms]![frm All Events]![Part 1 Location]
.Attachments.Add "C:\Program Files\Microsoft Office\MEDIA\Report1.snp"
.Body = Nz([Forms]![frmEvent_Part1_Details]![Additional Part Notes Text],
vbCrLf) & vbCrLf & vbCrLf & vbCrLf
.MeetingStatus = 1
.ResponseRequested = True
.Save
.Send
MsgBox "Event Request Sent."
End With


Exit_btnSendItem_Click:
Set objOApp = Nothing
Set objAppt = Nothing
Set oExp = Nothing
Exit Sub

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top