Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Displayed Dates in the Calendar folder

9 views
Skip to first unread message

Ken Slovak - [MVP - Outlook]

unread,
Nov 20, 2006, 9:29:58 AM11/20/06
to
This only applies to Outlook 2007, it's new in the object model.

Get the current view and if it's a CalendarView object you can use the
.DisplayedDates property, which returns a string array of all the dates
currently displayed. The .CalendarViewMode property will return an enum
member telling you what view is displayed (day, month, etc.).

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Eric Quist" <Eric...@discussions.microsoft.com> wrote in message
news:F107F020-5556-4787...@microsoft.com...
>I want to know what dates are shown in the calendar view? So if the Month
> view is selected I want, to get the month shown, and if the Week view is
> selected I want to get the start date and end date of tha selected week.
> When googeling I found a tip about adding a new Appointment and read the
> date from that, but the new Appointment is always created for today, no
> matter of which day is active (selected).
> I'm doing a VSTO 2005 SE add-in for Outlook 2007.

Sue Mosher [MVP-Outlook]

unread,
Nov 20, 2006, 11:50:43 AM11/20/06
to
Does DisplayedDates actually work for you, Ken? WIth the standard Day/Week/Month view active, even the code from the Help topic doesn't work for me. It returns -1 for UBound(varArray).

--
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

"Ken Slovak - [MVP - Outlook]" <kens...@mvps.org> wrote in message news:%23uKwFgL...@TK2MSFTNGP03.phx.gbl...


> This only applies to Outlook 2007, it's new in the object model.
>
> Get the current view and if it's a CalendarView object you can use the
> .DisplayedDates property, which returns a string array of all the dates
> currently displayed. The .CalendarViewMode property will return an enum
> member telling you what view is displayed (day, month, etc.).
>

Eric Quist

unread,
Nov 20, 2006, 1:48:02 PM11/20/06
to
I was also glad when I found DisplayedDates, but it is always an empty array
for me too.

/Eric

Ken Slovak - [MVP - Outlook]

unread,
Nov 20, 2006, 2:31:17 PM11/20/06
to
No, you're right Sue, it doesn't work at all here. I could swear it worked
for me in B1 or B2 but I don't have any installations left of those around
here. One more broken thing in Outlook 2007 I guess <sigh>

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Sue Mosher [MVP-Outlook]" <sue...@outlookcode.com> wrote in message
news:umrFFQMD...@TK2MSFTNGP04.phx.gbl...

Eric Quist

unread,
Nov 22, 2006, 5:42:02 AM11/22/06
to
FYI: I have also verified that the DisplayedDates is an empty array in the
COM objects too (tried to do a macro).

/Eric

Ken Slovak - [MVP - Outlook]

unread,
Nov 22, 2006, 9:58:49 AM11/22/06
to
It was confirmed as a bug by MS. We're waiting to find out if it's scheduled
to be fixed in SP1.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

"Eric Quist" <Eric...@discussions.microsoft.com> wrote in message

news:4F8ECD0C-B4DF-426C...@microsoft.com...

0 new messages