A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Retrieve all Outlook calendar appoinments for a day



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old June 12th 06, 01:53 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Retrieve all Outlook calendar appoinments for a day

See http://www.outlookcode.com/d/finddate.htm for information on using the IncludeRecurrences property.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
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 return all apointments on a
specific day no matter what type the are?

The query is initiated from Excel 2003 and the results are put into
cells.
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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i retrieve calendar in My Calendars Davem Outlook - Calandaring 3 January 29th 08 04:27 PM
Retrieve items from Other Users Calendar andy Outlook and VBA 2 June 2nd 06 09:48 PM
How can I create offline calendar appoinments for a cached account sm Outlook - Calandaring 0 April 27th 06 03:43 PM
From the Outlook Calendar Day View how do you advance one day? Steve300 Outlook - Calandaring 2 March 2nd 06 05:01 PM
How do I retrieve old calendar items? Keelpassa Outlook - Calandaring 1 March 1st 06 02:39 PM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.