Link to home
Start Free TrialLog in
Avatar of BITASCII
BITASCIIFlag for United States of America

asked on

Outlook 2010 Macro, sets Start date flag based on text in body of e-mail

Hi, SQL server sends e-mail each time a meeting reservation is confirmed. On some line in body of e-mail the label 'Meeting Start:'  appears on a new line, always after a blank line.  That label is followed by meeting start date information in the format mm/dd/yyyy.  2 examples are pasted below - disregard any time info, we are only interested in start date.

Does anyone know how in Outlook 2010 a vba macro can grab the date in body of above mentioned e-mail, set flag and set the Start date same as date in body of e-mail?

Here is how the sart date appears in body of e-mail -- first the blank line, then Meeting Start label, followed by date ...

Meeting Start:    11/16/2010 2:00:00 PM

Meeting Start:         5/17/2011 11:00:00 AM (Eastern Standard Time)

Appreciate any thoughts/solutions.  Volume of generated e-mails is up, a macro to set flag and start date would eliminate number of user errors.  Thanks :-)
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Any mail that comes in with this format to raise a calendar appointment of the same?  If so it ought to be doable, potential concerns would be for example re-arranged meetings and/or cancellations.

Chris
Avatar of BITASCII

ASKER

Hi Chris,  Appreciate your response very much!  Just to clarify, we are not looking to set a calendar appointment (that would get us into all the issues you point out above, and how right you are!), ... what we want is to set vlaue of 'start date' in the 'custom flag' for that e-mail.  

To display the 'custom flag' screen use shortcut (Ctrl+Shift+G)  - in open, or selected OL201 e-mail.

At heart of the original post is this string to date conversion question: can vba reliably convert a string found in body of e-mail so as to set date value of 'start date' in 'custom flag'?  

Screen shot attached shows e-mail with date string in body of e-mail, and start date field in custom flag, ... set manually.  Can vba replace that manual step? User generated image
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Chris, Works better than expected!  Very tight code, Sir!  Thanks much :-)