Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message oups.com... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to generate email list for Outlook from Excel cells | Excel Discussion (Misc queries) | |||
Create Outlook Calendar event from dates in excel | Excel Discussion (Misc queries) | |||
Create Outlook Calendar event from date in Excel | Excel Discussion (Misc queries) | |||
how do i export excel calendar info to outlook calendar? | Excel Discussion (Misc queries) | |||
import calendar items from excel into outlook calendar | Excel Discussion (Misc queries) |