Help With Sending an Outlook Appointment Request from Excel RRS feed

  • Question

  • For the life of me, I can't seem to get this code to work,

    I am trying to send an outlook appointment from Excel to a Public Calender in MS Outlook

    Any help is greatly appreciated.

    Calender Name is: ASF DG Calendar - Calendrier DG ASF

    Sub CreateCalEntry()
    Dim objfolder As Object
    Dim objOutlook As Object
    Dim objAppt As Object
    Dim mynamespace
    Set objOutlook = CreateObject("Outlook.Application")
    Set mynamespace = objOutlook.GetNamespace("MAPI")
    Set objfolder = mynamespace.Folders("Public Folders\All Public Folders\Regional Folders %2F Répertoires Régionaux\NCR %2F RCN\Safety and Security %2F Sécurité et Sûreté\Road Safety %2F Sécurité Routière\* All (ASF) %2F Tout (ASF)")
    MsgBox mynamespace
    Set objAppt = objfolder.Items.Add(olAppointmentItem)
    With objAppt
    .Start = Now()
    .Subject = "test the subject"
    .Body = "Test the body"
    .Location = "this is the location"
    .ReminderMinutesBeforeStart = 30
    .ReminderSet = True
    '.Close (olSave)
    End With
    Set objAppt = Nothing
    End Sub
    • Moved by Chao Kuo Tuesday, October 5, 2010 9:13 AM off-topic (From:Visual Basic General)
    Saturday, October 2, 2010 7:03 PM

All replies