+ Reply to Thread
Results 1 to 2 of 2

Using Excel to generate an Outlook Calendar Event

  1. #1
    Michael
    Guest

    Using Excel to generate an Outlook Calendar Event

    Hello,

    I was wondering if anyone knows how to generate an outlook calendar
    event from Excel. I have an Excel timeline for opening a new
    restaurant and there are certain things I need to do each day, and I
    would like to automatically add those dates into my Outlook Calendar
    somehow, then when I need to do a certain thing, it pops up on my
    Outlook calendar.

    Any ideas would be helpful, not sure if this can even be done,

    Thanks for your time,

    -Michael


  2. #2
    Steve Yandl
    Guest

    Re: Using Excel to generate an Outlook Calendar Event

    Michael,

    It can be done. Below is an example where I draw from sheet1 which was set
    up with Start times in Column A and locations in Column B. I suspect you
    will have other aspects of appointments you want recorded but this example
    should get you started. Note that once you open the VBE window, you want to
    select 'Tools > References' and put a check in the box for "Microsoft
    Outlook 11.0 Object Library" (number may vary depending on your version of
    Office)

    Sub ScheduleAppts()
    Dim ol As New Outlook.Application
    Dim ns As Outlook.Namespace
    Dim olFolder As Outlook.MAPIFolder
    Dim appt As Outlook.AppointmentItem
    Dim R As Integer
    Dim X As Integer

    R = Range("A65536").End(xlUp).Row

    Set ns = ol.GetNamespace("MAPI")
    Set olFolder = ns.GetDefaultFolder(olFolderCalendar)

    For X = 1 To R
    Set appt = olFolder.Items.Add
    With appt
    .Start = Sheets("Sheet1").Cells(X, 1).Value
    .Location = Sheets("Sheet1").Cells(X, 2).Value
    .Save
    End With
    Next X

    Set ol = Nothing
    Set ns = Nothing
    Set appt = Nothing
    End Sub

    Steve Yandl


    "Michael" <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    >
    > I was wondering if anyone knows how to generate an outlook calendar
    > event from Excel. I have an Excel timeline for opening a new
    > restaurant and there are certain things I need to do each day, and I
    > would like to automatically add those dates into my Outlook Calendar
    > somehow, then when I need to do a certain thing, it pops up on my
    > Outlook calendar.
    >
    > Any ideas would be helpful, not sure if this can even be done,
    >
    > Thanks for your time,
    >
    > -Michael
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1