UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Assign Form Data To Specific Outlook Calendar, Office 2010    
 
   
tomfernandez1200...
post Apr 12 2017, 03:44 PM
Post#1



Posts: 325
Joined: 24-August 10



Hello,

I have an appointment form in 2010 Access that sends information in the appointment fields to my 2010 Outlook calendar. The code is provided below. It works great, but I need the appointment to go to a different calendar instead of my default calendar. The right calendar is in a public folder on a server exchange. Here is my questions:
- how do I get the data in the form to go to a different folder in a public share folder?

Any advice or direction on this matter would be greatly appreciated! Thank you!! -Tommy

Private Sub AddAppt_Click()
On Error GoTo AddAppt_Err
' Save record first to be sure required fields are filled.
DoCmd.RunCommand acCmdSaveRecord
' Exit the procedure if appointment has been added to Outlook.
If Me!AddedToOutlook = True Then
MsgBox "This appointment already added to Microsoft Outlook"
Exit Sub
' Add a new appointment.
Else
Dim outobj As Outlook.Application
Dim outappt As Outlook.AppointmentItem
Set outobj = CreateObject("outlook.application")
Set outappt = outobj.CreateItem(olAppointmentItem)
With outappt
.Start = Me!ApptDate & " " & Me!ApptTime
.Duration = Me!ApptLength
.Subject = Me!Appt
If Not IsNull(Me!ApptNotes) Then .Body = Me!ApptNotes
If Not IsNull(Me!ApptLocation) Then .Location = _
Me!ApptLocation
If Me!ApptReminder Then
.ReminderMinutesBeforeStart = Me!ReminderMinutes
.ReminderSet = True
End If
.Save
End With
End If
' Release the Outlook object variable.
Set outobj = Nothing
' Set the AddedToOutlook flag, save the record, display a message.
Me!AddedToOutlook = True
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Appointment Added!"
Exit Sub
AddAppt_Err:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Exit Sub
End Sub
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    25th July 2017 - 09:36 AM