![]() ![]() By clearing the content control text first, Word treats the date assignment as a value change and thus reformats the date. change "February" to "Feb" or even change "Tuesday" to "Saturday"), Word will preserve my formatting. ![]() I found that when a date picker content control is mapped to a custom XML value, if I change the date, Word will reformat it, but if I change the formatting of the date (e.g. ToString() when the date being assigned is the same as the date already in the control. Text = "" prevents Word from using the formatting given by. When you type a date into the content control, Word parses and reformats it, or shows the text as given if it couldn't parse it. Setting the content control text property is like typing a value into the content control as a user. Ĭ = "" // ensure Word reformats dateĬ = dt.ToString() You can also use a date picker to display preset dates, such as the current date. For example, you can use a date picker to collect birth dates from people on an insurance form. If you simply want to set a Word date content control's value to a date, respecting its formatting: DateTime dt =. A date picker is a control that lets users quickly enter dates in a Microsoft Office InfoPath form by clicking a small pop-up calendar. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |