-
Extract current date from the Calendar
For the Calendar, what is the programmatic way to extract the current date and store it in a variable?
I am developing a command to delete an appointment on the day that is currently displayed, based on time information the user provides at run time. But to make this work, I need a way to evaluate the value of AppDate:
[vba]
Dim outobj As Outlook.Application
Dim outappt As Outlook.AppointmentItem
Set outobj = CreateObject("outlook.application")
Set outappt = outobj.CreateItem(olAppointmentItem)
Let AppDate = [???]
AppTime = [provided by user, e.g., "11:22 AM"]
With outappt
.Start = AppDate & " " & AppTime
.Delete
End With
' Release the Outlook object variable...
Set outobj = Nothing
[/vba]
If there is a better way to do this, I'm interested!
-
-
Is this really true? (From the Description):
"Outlook provides no direct way to read the time block [I assume this also means the date, which is what I am looking for] the user may have selected in a calendar folder."
-
Makes sense. A tool like Outlook Spy might provide more insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules