Date/Time Field Natural Language Usage in VBA?

Status
Not open for further replies.

simpsojp

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server 2010
I've searched around for an answer and couldn't find one so I'll ask the experts:

Can VBA make use of Outlook's powerful natural language interpretation of Date/Time entries made to a custom userform?

Here is my scenario:
I've got a userform acting as an in/out board for our office. Users open a form and input whether they are in or out, and if leaving, they have the option of saying where they are going and when they will be back. As the form uses the Outlook Date/Time field, input syntax is very very flexible and works great. Unfortunately, this isn't easy enough, and most people don't take the time to open the "in/out board", open their personal form and fill it in before leaving.

I have a macro written that executes when Outlook closes and asks where you are going and when you will be back then automatically fills in the form data. My problem is that unless the inputbox entry isn't properly formatted as a date, the string is posted to the form's textbox incorrectly. Users can't type "tomorrow" or "Monday" or other natural language inputs as they can on the actual form. Obviously format(), cdate(), datepart(), etc. can help with certain instances, but there's no way I can emulate, with code, the flexibility of the actual field.

So, if there is a VBA function that can use the date/time field directly, or if a macro can write to the form, then process the form it as if a user had actually typed it themselves, we'd have the perfect solution!

Thanks for the help!
-Pete
 
Status
Not open for further replies.
Top