Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
itsupport@cthomes
 
Posts: n/a
Default Dates in Excel linked with Outlook Calendar

Is there a way to link dates from an Excel spreadsheet to an Outlook
Calendar? I would like to have reminders in my Calendar for times when I
want to send out Marketing materials. Thanks in advance.
  #2   Report Post  
Alok
 
Posts: n/a
Default

Use code such as shown below

Sub AddToOutlook()

Dim o As Outlook.Application
Dim ai As Outlook.AppointmentItem

Set o = GetObject(, "Outlook.Application")
Set ai = o.CreateItem(olAppointmentItem)
ai.Body = "Do abc"
ai.Subject = "Things to do"
ai.Start = "05/19/05 04:00:00 PM"
ai.Duration = 30
ai.Close olSave

End Sub

Alok Joshi
"itsupport@cthomes" wrote:

Is there a way to link dates from an Excel spreadsheet to an Outlook
Calendar? I would like to have reminders in my Calendar for times when I
want to send out Marketing materials. Thanks in advance.

  #3   Report Post  
itsupport@cthomes
 
Posts: n/a
Default

Thanks for your response, but can you walk me through the steps to add this
code into the program. I don't know much about computer programing and such.

Thanks again.

"Alok" wrote:

Use code such as shown below

Sub AddToOutlook()

Dim o As Outlook.Application
Dim ai As Outlook.AppointmentItem

Set o = GetObject(, "Outlook.Application")
Set ai = o.CreateItem(olAppointmentItem)
ai.Body = "Do abc"
ai.Subject = "Things to do"
ai.Start = "05/19/05 04:00:00 PM"
ai.Duration = 30
ai.Close olSave

End Sub

Alok Joshi
"itsupport@cthomes" wrote:

Is there a way to link dates from an Excel spreadsheet to an Outlook
Calendar? I would like to have reminders in my Calendar for times when I
want to send out Marketing materials. Thanks in advance.

  #4   Report Post  
Alok
 
Posts: n/a
Default

If you have not done any VBA programming then I am not sure if this should be
your first project.

However the steps are
1. You will have to switch to the Visual Basic Integrated Development
Environment (in simple words, where you write your code) and select
Tools/References and in the list that you see you will select Microsoft
Outlook 9.0 Library.
2. You then insert a Module and type in the code that I presented earlier.
3. You should be able to run the code by clicking anywhere in the code and
pressing F5. When you do this, your Outlook Application should be open. You
then go and switch to Outlook to make sure that an appointment was added.
4. The above steps demonstrate that the code is working.
5. Now your challenge is to take the data from excel and use that to create
the Appointments
You do this by Code such as this

Dim r&,sSubject$,sBody$,dStartTime as Date,dDuration#


for r = 2 to 50
'Assuming that Subject is in column A
sSubject = Sheet1.Cells(r,1).value
'Assuming that Body is in Column B
sBody = Sheet1.Cells(r,2).value
'Assuming that Start Date and Time is in Column C
dStartTime = Sheet1.Cells(r,3).value
'Assuming that Duration is in Column D
dDuration = Sheet1.Cells(r,4).value

Set ai = o.CreateItem(olAppointmentItem)
ai.Body = sBody
ai.Subject = sSubject
ai.Start = dStartTime
ai.Duration = dDuration
ai.Close olSave


Next r

Basically you use the same code as shown earlier but replace the code for
single Appointment creation with the loop shown above.

Hope this is clear.

Alok Joshi

"itsupport@cthomes" wrote:

Thanks for your response, but can you walk me through the steps to add this
code into the program. I don't know much about computer programing and such.

Thanks again.

"Alok" wrote:

Use code such as shown below

Sub AddToOutlook()

Dim o As Outlook.Application
Dim ai As Outlook.AppointmentItem

Set o = GetObject(, "Outlook.Application")
Set ai = o.CreateItem(olAppointmentItem)
ai.Body = "Do abc"
ai.Subject = "Things to do"
ai.Start = "05/19/05 04:00:00 PM"
ai.Duration = 30
ai.Close olSave

End Sub

Alok Joshi
"itsupport@cthomes" wrote:

Is there a way to link dates from an Excel spreadsheet to an Outlook
Calendar? I would like to have reminders in my Calendar for times when I
want to send out Marketing materials. Thanks in advance.

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
Stop Excel Rounding Dates leinad512 Excel Discussion (Misc queries) 1 April 20th 05 04:19 PM
How do I export email addresses from excel to outlook? Mark Davies Excel Discussion (Misc queries) 1 February 2nd 05 02:21 PM
How do I link to an Outlook public folder from an Excel spreadshe. DJBaker Excel Discussion (Misc queries) 0 January 28th 05 08:35 PM
Ploting dates against a calendar and not as a simple events Barb Reinhardt Charts and Charting in Excel 2 January 22nd 05 03:41 AM
Excel and OUTLOOK Andre Croteau Excel Discussion (Misc queries) 1 November 28th 04 09:33 PM


All times are GMT +1. The time now is 05:52 PM.

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

About Us

"It's about Microsoft Excel"