PDA

View Full Version : Obtaining current date from calendar view



mar70
08-09-2005, 01:58 PM
I'm probably wrong (I hope I am), but there does not appear to be any method in the Outlook object model to obtain the current date (or date range) from a day/week/month view of a calendar folder. I would like to obtain this date for use in a macro. Any ideas? Thanks!

MOS MASTER
08-09-2005, 02:11 PM
Hi and Welcome to VBAX! :hi:

Could you be a more specific on which calendar control you're using and where you're using it on? (Perhaps describe steps of how you put it in)

:whistle:

mar70
08-09-2005, 02:16 PM
There is no separate calendar control. I am exporting appointments to an Access DB, but I would like to provide a button-activated macro from the ActiveExplorer which will automatically export all of the appointments from the day being viewed in the ActiveExplorer. I can do this if ActiveExplorer.Selection.Count > 0. However, if the user does not have at least one AppointmentItem selected, I cannot figure out a way to read what day they are viewing in their calendar. Does that help explain it better?

MOS MASTER
08-09-2005, 02:24 PM
Ah Ok..you mean the calendar itself in Outlook and not a control.

Have to think about that one. :yes

MOS MASTER
08-09-2005, 02:29 PM
Nopes I'm sorry doesn't seam to be possible.

I did a quick search and found 3 answers from Outlook MVP's saying its impossible.

Perhaps the only way is to have the person provide the date himself in a inputbox or custom form! :whistle:

mar70
08-09-2005, 02:31 PM
Thanks anyway. Although, I do believe nothing is impossible programming wise.... it's just going to be extremely difficult (and perhaps more trouble than it's worth).

MOS MASTER
08-09-2005, 02:34 PM
Hi, :yes

I like to believe that as well!

But like you said if I don't know a answer I do a quick look and if people who know there stuff say it's impossible then I'm going to save myself the trouble in proving them different.

Time is precious.

Later..:whistle: