View Single Post
  #4  
Old November 19th 07, 09:44 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Getting the date in Calendar View

Instead of CreateItem, call the New command from the menu/toolbar. See http://www.outlookcode.com/codedetail.aspx?id=616

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"BremUser" wrote in message ...
Michael,

Thank you for you reply.
But it doesn't work.
When I create a new appointment with:
loAppointment = Application.CreateItem(olAppointmentItem)
I always get todays date in the start date.

The Calendar View is of type Day/Week/Month in the Month view.
When a day is highlighted, I want to know what that day is in VBA. Isn't
there any property field in the CalendarView object, which I missed?

Regards
Ben
Technology Consultant Microsoft Technologies



"Michael Bauer [MVP - Outlook]" wrote:



Create a new AppointmentItem by code, don't call its Save method but read
its start date.



Am Sun, 18 Nov 2007 11:34:00 -0800 schrieb BremUser:

In Calendar view in Outlook 2007, I want to retreive the date of the day I
selected. When I double-click on a date the appointment-form comes up with
the right date filled in. What I want to do is selecting a day and

clicking a
toolbar-button with a vba-script behind it, that uses that day for further
handling.

Can someone help me please?


Ads