|
|
|||
| Outlook Form Design Printer Friendly Version | |||
|
|
Designing custom Outlook forms and form regions and writing code for them | ||
| Topic | |||
|
|
Frustrated novice needs help!!!
I am a reluctant novice to Outlook custom forms, having been forced into developing some for our company by a boss who is an IT professional but has no time to do it himself. And just because I managed several months ago to make some simple forms, he expects blasted miracles - and of course simply will not accept that programming Outlook has limitations ('cos he is a VBA expert!). Suddenly they need something else, and I cannot do what is needed - even after around 40 hours of searching and trying. I am so disgusted with myself I don't even have a 'bad' script to post to see what I have been doing wrong. Anyway, we are using Outlook 2000 (still - yes we have avoided upgrading and the recession has forced us to extend our upgrade even further into the distance). Any help with a solution to the following will get huge Kudos and my undying appreciation! Custom email form User inputs two dates into two control fields on the compose page: arrivalDate departureDate These are input in MS standard date format, e.g. Tue 23-Sep-2009 In the read/reply page that the recipient receives, I need these dates to be presented (read) by the recipient in a custom format - so that they can easily cut & pasgte it into an application we are using in the following string format: Tue, 23 Sep, 2009 I know that Outlook forms do not support custom formats and do not take custom formats from the host machine. Furthermore, in a custom form control you cannot use the WeekDayName or MonthName functions to cast the names - if we could, I could easily concatenate the right string. So I want to cast this date as a string (in my special format) using the script editor in Outlook custom forms. We don't want to use VBA as that would take me into a whole new area of programming and macro writing, etc. which I would need to learn from scratch. So if any very kind, very generous, very clever programmer chap or chappess can help with converting a date/time field into a cast string... thus arrival date = Tue 23-Sep-2009 >> to arrivalString = Tue, 23 Sep, 2009; and departure date = Mon 29-Sep-2009 >> to departureString = Mon, 29 Sep, 2009 Thanks Nick at the Kennels in Dubai Nick Truscott 03-Nov-2009 09:24 |
||
|
|
Sue Mosher
03-Nov-2009 09:44
Need more information: By "control fields," do you mean that arrivalDate and departureDate are the names of custom properties that have been added to the form? Is the form published (or due to be published) to the Organizational Forms library on the Exchange server? Does the text to be presented to the recipient need to be localized to the user's display language? Or is it always going to be in English? |
||
|
|
Nick
03-Nov-2009 10:29
Hi there 1. Yes - they are the sutom properties (sorry) 2. All our custom forms are available from the Calendar folder. Is this OK??? 3. Yes - always English Thanks. Nick |
||
|
|
Sue Mosher
03-Nov-2009 10:57
2 - No, that may not be OK. A message form generally needs to be in Org Forms or the user's Personal Forms library, although that's more of an issue with later versions of Outlook. In Outlook 2000, the option to "send form definition with item" might work. Please test before proceeding any further with your design. I think I'd approach your issue by using code in the Item_Send event handler to create a string using standard date-part functions like Month() to separate out the date bits and then use that string to set the value of a separate text property, which you'd have to create and add to the form design. |
||
|
|
Nick
03-Nov-2009 11:58
Many thanks Sue and I appreciate the advice on 2. However my main issue is not where the form resides - the existing version of this particular custom message form works just fine for our users (senders and receivers) with no issues with it residing in the Calendar folder (it's only used internally through Exchange server). The critical issue is that I am unable to cast the required custom string because the scripting associated with the properties does not allow me to use vb\s WeekDayName and MonthName functions. If it was just the numeric values it wouldn;t be a problem. That's why I was asking about scripting in the Script Editor (to use MonthName and WeekDayName) in order to cast "Tue, 23 Sep, 2009". Nevertheless, thank you for your interest and the very rapid response - as I said, it sounds a little too complex for me so I will need to either find a easier to understand solution or they will have to do without cut & paste! :-) |
||
|
|
Sue Mosher
03-Nov-2009 12:28
You can write your own functions to return the weekday and month abbreviations, or search the Internet to find one that someone else has already written for VBScript. |
||
|
|
|||
