Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
littlegreenmen1
 
Posts: n/a
Default Copying Excel schedules to different Outlook Calendars


I am a contractor and have a schedule in Excel for each of the houses
I'm building. As it is right now, I have a macro that exports all the
relevant information from each of my schedules (one at a time) and
imports it into Outlook. This works just fine. My problem is, I have so
much information on one calendar that it makes it hard to read. I have
setup Outlook Calendar to have a different calendar for each job. How
do I get Excel to send the schedule to it's approriate Calendar (ie:
the Excel schedule for 123 Anywhere St would be copied to the Outlook
Calendar for 123 Anywhere St and not the default calendar). Below is my
existing code that will export everything into just the default
calendar. Thank you for any and all help.

Sub Calendar()
Dim olApp As Object
Dim olApt As Object
Dim x As Integer
Dim olBody As Range
Dim olSubject As Range
Dim olDate As Range
Dim olAddress As Range

EraseCalendar

For x = 3 To 200
Set olSubject = Sheet1.Cells.Item(x, "B")
Set olNotes = Sheet1.Cells.Item(x, "J")
Set olDate = Sheet1.Cells.Item(x, "C")
Set olAddress = Sheet1.Cells.Item(1, "O")
Set olApp = CreateObject("Outlook.application")
Set olApt = olApp.CreateItem(1)

If olDate = "" Then
Exit For
End If

If olSubject = "Start Date" Then
GoTo Label1
End If

If olDate = "Date Required" Then
GoTo Label1
End If

If olDate < Date Then
GoTo Label1
End If

With olApt
.AllDayEvent = True
.Start = olDate
.Subject = olSubject
.Location = olAddress
.Categories = olAddress
.Body = olNotes
.BusyStatus = 0
.ReminderSet = False
.Save
End With

Set olApp = Nothing
Set olApt = Nothing

Label1:
Next x

End Sub


--
littlegreenmen1
------------------------------------------------------------------------
littlegreenmen1's Profile: http://www.excelforum.com/member.php...o&userid=23978
View this thread: http://www.excelforum.com/showthread...hreadid=383982

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
Linking Excel to Outlook?? Pegasusnb7 Excel Discussion (Misc queries) 1 May 5th 05 10:32 PM
Why is Excel being opened in Outlook? JW Excel Discussion (Misc queries) 1 May 4th 05 05:00 AM
Excel and OUTLOOK Andre Croteau Excel Discussion (Misc queries) 1 November 28th 04 08:33 PM
Copying an Excel spreadsheet to a Word document KG Excel Discussion (Misc queries) 1 November 28th 04 07:38 PM
Excel & Copying Formulas JComer Excel Worksheet Functions 1 October 28th 04 07:17 PM


All times are GMT +1. The time now is 12:53 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"