Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Macro to create a Outlook Appointment from excel cell data

The example below pulls the 'start' property (date/time) of the appointment
item from column A and the 'location' property from column B and begins with
Row 1 (no header row). It sounds like you will want to modify it to include
more properties, possibly 'duration', 'ReminderMinutesBeforeStart',
'ReminderSet', 'RequiredAttendees' and possibly others. Before starting,
press Alt plus F11, click 'Tools References' and set a reference to the
Microsoft Outlook xx.0 Object Library (xx depends 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



"Alarmbloke" wrote in message
...
Hi,

I need an excel macro which when run will use cell data to create an
Outlook
Appointment with a reminder.

Ie
A1 Customer Name
A2 Appointment Date
A3 Appointment Time
A4 Reminder Time
etc etc

Can anyone help

Thanks,

Scratchy Head Alarmbloke




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to create outlook appointment Dan Wood Excel Discussion (Misc queries) 2 March 4th 10 01:31 PM
Automatically create outlook appointment Alarmbloke Excel Discussion (Misc queries) 0 March 12th 06 08:47 PM
Create a button in excel that can open an outlook appointment? Movieman Excel Worksheet Functions 1 July 15th 05 12:20 AM
make appointment in outlook and send email reminder - all data in excel 2000 DL[_3_] Excel Programming 2 August 5th 03 11:08 PM
make appointment in outlook using data in excel -- set recurrence tegger topwith Excel Programming 0 August 3rd 03 03:21 AM


All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"