A family of Microsoft word processing software products for creating web, email, and print documents.
For more on formatting date fields, see my page: Using Date Fields in Microsoft Word
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to format my dates on Microsoft Word as such: sixth (6). How do I achieve this in programming the field code. Microsoft doesn't have advanced tutorials on this or I haven't looked hard enough. I tried the date as "ddd", which gives me 'Friday,' and "d", which gives me '6' but cant seem to get this numchar to be sixth, in the roman numeral format. I'm doing this for a court related document!
A family of Microsoft word processing software products for creating web, email, and print documents.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
For more on formatting date fields, see my page: Using Date Fields in Microsoft Word
Answer accepted by question author
A good reference for switches used to format various kinds of fields is https://www.gmayor.com/formatting_word_fields.htm . The topic of this thread is discussed there under the heading "Date fields with ordinals".
If you use \* ordtext instead of \* ordinal, the number will be spelled out.
Answer accepted by question author
Word can't do spelled ordinal numbers, but it can do numeric ones like 6th. The ordinal will have to be in its own field. Here are the steps:
Yes, you can write field codes directly on the document, and the result will be displayed when you update the field.
If you're starting with an existing field, right-click it and choose "Toggle Field Codes" in the menu, or select the field result and press Shift+F9 (or, on some laptops, Fn+Shift+F9). Either method will display the field's code, and you can type whatever you need to change it. When you finish, press F9 (or Fn+F9) to update the field and display the result.
If you're making a new field, start by pressing Ctrl+F9 (or Fn+Ctrl+F9) to insert the field brackets at the cursor position. You won't get a real field if you just type the brackets on the keyboard; you must use Ctrl+F9 if you aren't using the Field dialog. Then you can type the field code, starting with the keyword that determines what kind of field it is, and adding the other parts as needed. Again, press F9 to update and display the result.
You can find the syntax of the codes and the switches they support by going to List of Field Codes in Word and clicking on the link to the desired field type. There are some other switches that apply to most kinds of fields; those are discussed in the page https://www.gmayor.com/formatting_word_fields.htm that I cited before.
The term "compiler" is not really applicable to a Word document in the same sense as it is to Visual Basic or other code.
What exactly do you mean? Can you give an example of the code that you want to write and how you expect it to be "compiled"?