![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have a lot of date/time fields in a public folder and its corresponding
form, formatted as "9/22/2006" or "8:24 AM" depending on their application and user preference. These formats hold within the form, but if I populate a Word doc's bookmarks using UserProperties, they are all formatted as "9/22/2006 8:24:00 AM" which makes a big ugly mess. I can use FormatDateTime( ) on the UserProperties, but it does not offer a good solution for time. vbShortTime format is military time. vbLongTime includes the seconds, which I don't want either. It would seem I'm faced with these choices: Pull the display values from the form controls instead of the UserProperties. Doing string manipulation on the UserProperties to obtain time strings like "8:24 AM" Redo the Word template with Form fields formatted as desired (would this even work?) . Are there other simpler approaches? Thanks, Bill Le May |
Ads |
#2
|
|||
|
|||
![]()
Write your own function to produce the desired format, using standard functions like Month() and Day() to return each date/time part.
Formatting the Word fields might be worth trying. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Bill" wrote in message ... I have a lot of date/time fields in a public folder and its corresponding form, formatted as "9/22/2006" or "8:24 AM" depending on their application and user preference. These formats hold within the form, but if I populate a Word doc's bookmarks using UserProperties, they are all formatted as "9/22/2006 8:24:00 AM" which makes a big ugly mess. I can use FormatDateTime( ) on the UserProperties, but it does not offer a good solution for time. vbShortTime format is military time. vbLongTime includes the seconds, which I don't want either. It would seem I'm faced with these choices: Pull the display values from the form controls instead of the UserProperties. Doing string manipulation on the UserProperties to obtain time strings like "8:24 AM" Redo the Word template with Form fields formatted as desired (would this even work?) . Are there other simpler approaches? Thanks, Bill Le May |
#3
|
|||
|
|||
![]()
"Hollis Paul [MVP - Outlook]" wrote...
As far as I know there are no simple solutions to this. I don't think getting the values from the controls will produce anything different. Actually the Text property of the control gives me what I want: Set objPage = Item.GetInspector.ModifiedFormPages("Travelers") Set txtControl = objPage.Controls("txtTraveler1DepartTime") strTime = txtControl.Text Thanks, Hollis. |
#4
|
|||
|
|||
![]()
In article , Bill wrote:
Are there other simpler approaches? As far as I know there are no simple solutions to this. I don't think getting the values from the controls will produce anything different. Search at www.outlook-code.com and see if you can find a discussion of this problem or example code. -- Hollis Paul Mukilteo, WA USA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Date format | Roger | Outlook Express | 4 | September 13th 06 03:46 AM |
date format on custome field | artmyth | Outlook - Using Forms | 3 | July 19th 06 11:32 PM |
Date Format in Outlook | Bonnie | Outlook - Calandaring | 3 | April 18th 06 07:15 PM |
Changing date format in outlook express | ibowey | Outlook Express | 2 | March 13th 06 01:33 PM |
Date format when printing | R Fourt | Outlook - Using Forms | 0 | January 11th 06 03:41 PM |