acantor
10-21-2009, 07:59 PM
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:
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
If there is a better way to do this, I'm interested!
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:
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
If there is a better way to do this, I'm interested!