Lỗi The character position is not valid or not in the right place
by Charles Kyle Kenyon, Esq. Last updated Thursday, November 17, 2022. There are no promises that this chapter is of the same quality and depth as the other chapters of this guide. That is because it was written by a single author not working with Microsoft and not subject to peer review. You will not find this chapter on the Microsoft site. Comments are welcome. You may want at least skim the
bookmarks and cross-reference portions of Complex Legal Documents before tackling this chapter. (Cross-references are one type of field.) After completing this lesson, you will be able to:
Other Chapters Related to Topics Covered in this LessonAdditional Written (and Web) Resources
(this guide table of contents) ------- (MS Word New Users FAQ) "A field in a Word document is simply a placeholder that contains the instructions for what should go here rather than the text itself." Fields Overview
How to type fields in Word
How to toggle the Display of Field Codes in Word
How to copy a field from a newsgroup or email message into Word:
Using the Insert Field... dialog box to insert fields
The Difference Between MERGEFORMAT and CHARFORMAT
Field Categories (per Microsoft)
The DATE field and its variations.
Remember that fields in headers and footers don't get updated quite as predictably. They work fine with CREATEDATE but can have the same problem as page numbers (see that topic) with DATE. The Function and Shortcut Keys that manipulate fields
Advance Field
Finding Fields in a Document Using the Find Command
Bookmarks and Cross References (from Complex Legal Documents)Inserting Bookmarks
Navigating With BookmarksPractice: Find your Bookmarks
To refer the reader to another part of the document, you can insert a cross-reference. See How Cross-Reference Fields in Word Work by Lene Fredborg, MVP. Here is a video in the legal context: How to cross-reference and Interrogatory
- -
Updating Cross-references
ASK Fields
Pagination Fields
These switches work in any field that has numeric information. More about using calculation fields and page fields: How to control the page numbering in a Word document. Switches are ignored in any Table of Contents / Table of Figures. Those fields pay attention to the format set in the page number format dialog. In Ribbon versions of Word Page number fields are also in Building Blocks under the Insert>Page Number button. You can find an example of additional building blocks structured as header/footer building blocks for the Page X of Y structure on my Downloads Page. As with all fields, you must let Word insert the field delimiter braces { }, you cannot simply type them. See the introductory material in this page. MacroButton Field Tips and Tricks - not just for macrosThe MacroButton field is a field developed in early versions of Word (pre-Windows). The name comes from the ability to trigger a macro. It was early used to insert dummy text for typing and can still serve that function well, without any macros. It continues to work, well, in Word 2019. MacroButton Fields - Syntax and Behavior
MacroButton Fields as Prompts
MacroButton Fields to Run Macros
Selection.Collapse 'Unselects the current selection and places 'insertion point at beginning of selection. Note also that a macro button prompt will print as ordinary text. (It is the field result). To avoid it being printed, you may want to put it in a no-border text box formatted as hidden text (Format => Font). Because of this, it is often easier to use a custom toolbar with a button on that toolbar. The toolbar will not print. MacroButton Fields can be used in Protected Forms and will be active even in a protected portion of the document. They are often used in such forms as a replacement for hyperlinks (since regular hyperlinks are inactive in the protected portion of a form). A simple example of macrobuttons can be found in the CheckBox template. This template/tutorial combines the powers of macros, autotext, and the macrobutton field. MacroButton Fields where the Macro responds to the contents of the field (uses them as an argument or variable for the macro)
Making MacroButtons respond to a single click
Using MacroButtons to function as hyperlinks in protected forms.
Example of MacroButton Field Use in Multiple Ways - The Microsoft Fax Transmittal Template from Word 97
Different behavior with images for text in .doc vs .docx formatted documents
MacroButton Field Prompts compared to Content Controls
MacroButton Fields and the Table of Contents
Additional references on MacroButton fields
(this guide table of contents) ----- (MS Word New Users FAQ) Search Usersguide to Microsoft Word using Google The GoToButton Field
Using the STYLEREF Field
Switches and the checkboxes
TroubleShooting the STYLEREF Field
Using the STYLEREF Field and Styles in the header/footer instead of multiple sections with different Headers / Footers
Using the STYLEREF Field to create dictionary-style headers/footers
Using the STYLEREF Field and Styles instead of Bookmarks and REF fields
Formula (Calculation) Fields - Conditional Fields
{ = 1 + 3 - 1 }
Conditional Fields - The IF field
{IF 1=1 "One does equal one!" "This one doesn't equal that one!"} Trivial? How about: {IF {REF "Gender"} = "Male" "He" "She"}. (Download the Gender Toolbar template to see how this works in real documents.) An example of the same thing using a mergefield would be: {IF { Mergefield Gender } = "Male" "He" "She"} You may have noticed that we have one field inside of another field here! Yes, fields can use other fields for parts of their structure. An If field can be used to display/hide a table or pull in the contents of a completely different document depending on the results of the condition. Note that the tests for text in the IF field are case-sensitive. y is not the same as Y; Male is not the same as male. As with all fields, you must let Word insert the field delimiter braces { }, you cannot simply type them. See the introductory material in this page. As with most other fields, if you type "IF Field" in Word Help, you will get the Microsoft Reference page on the field. If the condition changes after insertion of the field, the field may have to be updated manually. If Field Practice: A footer entry that only appears on the last page?
{PAGE} = {NUMPAGES}
{ IF { PAGE } = { NUMPAGES } "{ FILENAME \p }" "Page { PAGE } of { NUMPAGES }" }
Question for the curious:
{IF {PAGE} < {NUMPAGES}"Page {PAGE} of {NUMPAGES}" "{FILENAME \p}" }
Nested {IF} Fields
{IF {PAGE} = 1 "This is the first page." "{IF {PAGE} < {NUMPAGES}"Page {PAGE} of {NUMPAGES}" "{FILENAME \p}" }" }
Date Fields using IF
{ IF { DATE \@ "MM" } < 07{ DATE \@ "yyyy" }{ = { DATE \@ "yyyy" }+1 \# "0000" } }
{ CREATEDATE \@ "MMMM d"}, { IF { CREATEDATE \@ "MM" } < 07 { CREATEDATE \@ "yyyy" } { = { CREATEDATE \@ "yyyy" }+1 \# "0000" } }
The FILENAME field - insert the name of your document
Using Fields with AutoText
Formatting Field results (what shows on screen and prints)
Those applied by default:Capitalization (case) switches:
Dates: reviewed aboveNumbers:Instruction switches (as distinguished from picture switches)
For more, see Formatting Word Fields with Switches by Graham Mayor, MVP. Word Help topics:Word 2000
Word 97
The following is from the Chapter on Numbering: Create Sequence Fields for Interrogatories and MoreMicrosoft Reference on Sequence Fields
Practice: Use Sequence Fields
The Bookmark part of the syntax { SEQ Identifier [Bookmark ] [Switches ] } is optional and is when adding Cross-Reference text as part of the SEQ field. The Switches are also optional and are as follows:
Use Sequence Fields for Tickets and More
I've been printing tickets that require sequential numbering and have that working but I have some issues that are bigger then my knowledge. I have a word document with a table of 6 exact cells on a full page table. In those cell areas I have been printing tickets with a list and a mail merge and updating labels. I call to an excel list of 1-2000 and then I generate all the pages through the Finish and Merge option. This all works perfect. I get 2000 individually numbered tickets to print...however...I then have six tickets printed on a page of paper with ticket numbers 1, 2, 3, 4, 5 ,6 then the next page has 7,8,9,10,11,12. This is fine but I then have to cut and stack these tickets in groups of six and at that point none of the numbering is sequential. The tickets are basically random. Any suggestions on the best way to split the 6 regions so that the top left region would be 1-335, then the middle top would be 336-670, Then the top right would be 671-1005, then bottom left would be 1006 - 1340, Then bottom middle would be 1341-1675, then the final bottom right region would be 1676-2010? Answer: Use Sequence Fields
A similar question arose except with ten tickets per page and 500 tickets. The same analysis applies. Alternatives using Mail Merge are offered there that are easier but do not provide for sequentially numbered stacks of tickets.
Bar Code Fields
Using vba (macros -- Visual Basic for Applications) to insert fields in documents
Troubleshooting Fields � Issues To Watch Out For
Using this code which displays and then hides field codes will trigger a minor bug in Word 2013 that zooms the next document created/opened to 10%. Answers to question on footer field:{IF {PAGE} < {NUMPAGES}"Page {PAGE} of {NUMPAGES}" "{FILENAME \p}" }
{IF {PAGE} = 3"truetext" }
{IF {PAGE} = { = {NUMPAGES} - 1 }" "truetext" }
page views since 14 April 2004 |