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
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