![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Sorry, I'm new at this.....
I am programming MS Access can can make an outlook apt in the local calendar, but I'd like to make an apt to the shared or public folder. How do I specify in in which calendar I want the apt to be made? Here's the code I use for the local computer: On Error GoTo Add_Err Dim intI As Integer Dim dteStart As Date Dim dteStop As Date Dim intCounter As Integer Dim intNoDays As Integer dteStart = strStart dteStop = strStop 'Save record first to be sure required fields are filled. DoCmd.RunCommand acCmdSaveRecord 'Add a new appointment. Dim objOutlook As Outlook.Application Dim objAppt As Outlook.AppointmentItem Dim objRecurPattern As Outlook.RecurrencePattern Set objOutlook = CreateObject("Outlook.Application") Set objAppt = objOutlook.CreateItem(olAppointmentItem) With objAppt .Categories = "SHOWS" .AllDayEvent = True '.Start = Me!ApptDate & " " & Me!ApptTime .Start = strStart '& " 08:00 AM" 'Me!CallBack & " " & "09:00 AM" '.End = strStop '.Duration = Me!ApptLength '.Subject = strSubject '"Call " & Me!Name & "-Prospect" .Subject = strSubject '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 'Set objRecurPattern = .GetRecurrencePattern 'With objRecurPattern ' .RecurrenceType = olRecursWeekly ' .Interval = 1 ' 'Once per week ' .PatternStartDate = #7/9/2003# ' 'You could get these values ' 'from new text boxes on the form. ' .PatternEndDate = #7/23/2003# 'End With .Save .Close (olSave) End With 'Release the AppointmentItem object variable. Set objAppt = Nothing 'End If 'Release the Outlook object variable. Set objOutlook = Nothing 'Set the AddedToOutlook flag, save the record, display a message. 'Me!AddedToOutlook = True DoCmd.RunCommand acCmdSaveRecord 'MsgBox "Appointment Added!" Exit Function Add_Err: MsgBox "Error " & Err.Number & vbCrLf & Err.Description Exit Function Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2002 appointment sent to public folder calendar gets puts in someone elses calendar instead | QH | Outlook - Calandaring | 4 | February 24th 06 06:14 PM |
Making a form work in calendar view | Hugh | Outlook - Using Forms | 0 | January 30th 06 11:39 AM |
Making contacts in public folder the default for "New Contacts"? | Jarvster | Outlook - Using Contacts | 1 | January 27th 06 04:53 PM |
Making work week the default calendar view | GVarner | Outlook - Calandaring | 1 | January 27th 06 12:48 PM |
Making the Public Folder Contacts the Primary Contacts?? | Roman B. | Outlook - Using Contacts | 1 | January 9th 06 11:52 AM |