Results 1 to 2 of 2
  1. #1
    simon123 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018

    Adding an appointment to Outlook shared calendar

    Hi all,

    I have a bit of code that opens up a new calendar appointment, which does the trick just fine, except for the fact that it opens my default Outlook calendar and not my shared calendar. Does anyone know if it's possible to select a shared calendar by default?

    Here is the code I have added to a button in my form.

        Dim ouEvent As Outlook.AppointmentItem    
        Dim ouApp As Outlook.Application
        Dim dteStartDate As Date
        Dim strSubject As String
        Dim strProgrammeCode
        If IsNull([Programme Start Date]) Then
            MsgBox ("Complete start date info")
        strProgrammeCode = DLookup("[Programme Code]", "tblProgrammeList", "ProgrammeID=" & [Programmes])
        dteStartDate = Me.Programme_Start_Date.Value
        Set ouApp = CreateObject("Outlook.Application")
        Set ouEvent = ouApp.CreateItem(olAppointmentItem)
        strSubject = strProgrammeCode & " " & Me.Organisation_Name.Value
        With ouEvent
            .Start = dteStartDate
            .AllDayEvent = True
            .Subject = strSubject
        End With
        Set ouEvent = Nothing
        Set ouApp = Nothing
    End If
    Thanks for your help


  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    Google: VBA Outlook shared calendar

    Does this help
    How to attach file: To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access Import Outlook Shared/Team Calendar
    By Mattnix in forum Programming
    Replies: 0
    Last Post: 10-19-2017, 03:06 AM
  2. Exporting Appts from Access Form to a Outlook Shared Calendar
    By marcy.harris61 in forum Import/Export Data
    Replies: 1
    Last Post: 09-13-2016, 11:58 AM
  3. Access - Outlook Appointment shared calendar
    By Guerra67 in forum Access
    Replies: 1
    Last Post: 09-21-2014, 07:26 PM
  4. Replies: 1
    Last Post: 05-31-2013, 02:04 AM
  5. Need VBA code for adding to Outlook calendar
    By geraldk in forum Programming
    Replies: 3
    Last Post: 08-24-2012, 08:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums - Senior Forums