Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Retrieve all Outlook calendar appoinments for a day

I got this code from www.dicks-clicks.com web page and it works great
but it does not pick up meetings that were setup as reoccuring. For
some reason it skips them. How can I test for all apointments on a
specific day not matter what type the are?

I send the date to this sub from another.

Sub GetAppt(NeedDate As Date)

Dim olApp As Outlook.Application
Dim olNs As Namespace
Dim olFldr As MAPIFolder
Dim olApt As AppointmentItem

Set olApp = New Outlook.Application
Set olNs = olApp.GetNamespace("MAPI")
Set olFldr = olNs.GetDefaultFolder(olFolderCalendar)

For Each olApt In olFldr.Items
If Format(olApt.Start, "m/d/yyyy") = NeedDate Then
'Put the appointment subject text into the active cell
If ActiveCell = "" Then
ActiveCell = olApt.Subject
Else 'This will add a new line and the subject text of the
next appoitment
ActiveCell = ActiveCell & Chr(10) & olApt.Subject
End If
End If

Next olApt

Set olApt = Nothing
Set olFldr = Nothing
Set olNs = Nothing
Set olApp = Nothing

End Sub


Thanks
Scott

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
excel and outlook calendar Laurie Excel Discussion (Misc queries) 1 March 30th 09 05:11 AM
Outlook/ calendar Hannus New Users to Excel 0 March 18th 08 01:55 PM
how do i export excel calendar info to outlook calendar? Maggie Excel Discussion (Misc queries) 1 December 31st 07 10:27 PM
Appointments from Excel into Outlook Calendar Sh0t2bts Excel Worksheet Functions 0 March 9th 06 03:16 PM
import calendar items from excel into outlook calendar jsewaiseh Excel Discussion (Misc queries) 0 September 2nd 05 03:53 PM


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