Have you ever been writing a document for your editor or boss and they request that you insert a word count? Today we take a look at how to do it using Field Codes in Word 2010.
Insert Word Count
You can use a field code to enter the current word count in a document, and it will continue to update as you add more to the document. To enter a Word count, make sure you have the cursor where you want the count to appear.
Then click the Insert tab on the Ribbon.
Then in the Text group click on Quick Parts then Field.
Now in the Field dialog box browse through the available fields you can add to your document. There are quite a few including Table of Contents, Bibliography, Time & Date…etc. Starting with a simple word count, will get you started with the basics and allow you to explore more field codes in the future.
For this tutorial we’re going to insert a word count so under Field Names scroll down and select NumWords…
Now you can choose the field properties and numeric format… but to keep it simple we will just go with the defaults.
So here we can see that we have a word count of 1,232. Keep in mind you can put this anywhere in your document that you want. Here we put it under the title for instance because our Editor wants to know how many words are included. Then you can take it out easily with a highlight and delete.
If you want to update the field, just go ahead and enter in your additional text and/ or finish off your document. Then you can update it easily by doing a right-click the number field and select update field.
Here we added a couple more paragraphs and it updates accordingly.
In the future we’ll be taking a closer look at more creative ways for using Field Codes in your documents. This will definitely get you started in using Field Codes in your documents in Word 2010.
What is your take? Do you or have you used Field Codes in MS Word in the past? Leave a comment and let us know tips and tricks you’ve used to create awesome documents.
Related
- How Do I Number Tickets Consecutively?
- How to Change the Page Numbers in Microsoft Word 2010 Documents
- How to Calculate Negatives in Excel
- How to Add a Hyphen on Excel
- How to Access Spelling & Grammar In Word 2007
Microsoft Word includes fields that enable customized data insertion, including Word Count, Page Count and Sequence, which is used to create incremental counters. You can create a business plan using numbered content such as headings or paragraphs, or a simple table with numbered row blocks using the “SEQ” field name.
Launch Word and open the document in which the numbering is to occur. Place the cursor in the location where you want the first number to appear.
Click the “Insert” tab at the top of the application. Click “Quick Parts” in the Text group and choose “Field.”
Scroll through the “Field Names” section and choose “Seq.” In the “Field Codes” field, next to the “SEQ” text, type an identifier such as “mynum” or “seqnum” to create the first number.
Add numbers by inserting the same identifier at another location. Alternatively, copy the first one, select it and press “F9” to update the display. As a third option, you can use the keyboard shortcut “Ctrl-F9” and type “SEQ” and your identifier between the braces that appear. For instance, insert “
Some of Word’s most powerful features are hidden from view, and one of these is field codes. While you may have encountered field codes when using mail merge, that’s not the only task you can accomplish with field codes. In this article we’ll look at how you can use field codes by themselves and in conjunction with bookmarks to create smart Word documents.
Let’s see a field code at work. To begin:
- Choose Insert >Field
- From the Categories list choose Date and Time
- From the Field Names list choose Date
- Select the date format you want from the Field Properties list
- Click OK
What you see on the screen depends on your particular Word setup. You may see today’s date formatted in the style that you selected, or you may see a field code on the screen that looks something like this:
If you see the date rather than the field code, press the Alt + F9 keyboard buttons simultaneously to toggle between displaying field codes and the field code results. The field code you see is created inside a set of curly braces.
While it appears that you could type the curly braces on the keyboard to create your own field codes this is not the case, and these braces are special characters that can be inserted only by pressing the Ctrl + F9 key combination.
Another handy field code keyboard shortcut is Shift + F9 – use this when you are positioned inside a field code to toggle between displaying the field code and displaying the results for this field code only.
To manage how Word displays field codes, choose Tools > Options > View tab. You can select whether field codes show in the document or not (disabling this is the preferable setting) and when to shade the fields: Never, Always or When Selected. Selecting Always or When Selected may assist you in getting started with field codes and the shading won’t display when you print the document.
Click-Here Blocks
One way to harness field codes to help create smart documents is to use them for Click-Here blocks. You click on these markers in your document to enter text. These boxes help ensure that text is positioned correctly, and they provide a useful prompt for the user. To make one
Click an area in the document where you want people to type some text, and
- Choose Insert > Field
- From the Categories dropdown list choose Document Automation
- From the Field Names list choose MacroButton and click the Field Codes button in the bottom left corner of the dialog
In the Field Codes area you should see the word MacroButton followed by some text. Remove the text and replace it with the following text so the Field Code looks like this: MACROBUTTON ClickHere [Type Recipient’s name in here]
If you see the field code, press Alt + F9 so that you see just the prompt on the screen inside its square brackets. You can save this file either as a regular document or as a template.
Open the file or create a document based on the template and ‑ to see how the click-here block works ‑ click the prompt and type some text. When you do this, the field code disappears to be replaced by the text that you typed.
The basis for this click-here block is the MacroButton field code that is typically used to run a macro. However you can trick it into acting as a click-here block by typing a macro name that does not exist. The text you place in the square brackets is the prompt that will show on the screen. The square brackets are optional but they make the click here block look more professional.
You can create multiple click-here blocks in one document – use the same macro name and just change the prompt for each of them.
13 October 2020
Word field codes are a way to add some automation or automatic content into your documents. A simple example is the field which will add the current date to a letter.
Chances are good that you’ve already used field codes and not realised it. Date, PrintDate, Page numbering (current and total pages), chapter names in a header are just some Word features that use Field Codes. Word Mail Merge is all about field codes.
Even the humble web link is a field code – any link in Word looks like this when you view field codes: . That’s essential knowledge if you want to find/replace web links or just figure out why a link isn’t working.
Insert Field Codes
The quick way to add a Word field code is from Insert | Text, click on the Quick Parts icon and choose ‘Fields …’ in Word for Windows or Mac.
Then choose the field code you want from the list on left.
The options in the center and right sections will change, depending on the field code selected. In the above case, a list of all Quick Parts / Building Blocks.
Here’s the DATE field with formatting and other options:
All the options in the Insert | Field dialog are available from the switches and settings in the field itself.
Choose the options you want and click OK to insert the field.
Show the field code
Normally, Word shows the result of the field code unless you click inside it, then it turns to gray.
Often, you’ll want to see the field code and perhaps change it. Press Alt + F9 to reveal the field codes or Shift + F9 to reveal only the currently selected field code.
You can now alter the field code and details. Alt + F9 again to hide the field codes.
Ctrl + A (Select all) then F9 will update all the fields in a document.
All the Field Code options
For some, but not all, field codes Word shows a more easily understood version of the options. Here’s the Field Properties for PrintDate as shown by Insert Field
Choose from the options shown. To see more choices or tinker with the preset options click Field Codes at bottom left.
Now you can see the exact field code and can change it. We’ve edited the date/time format away from the preset choice to something similar.
At bottom left is ‘Hide Codes’ which takes you back to the main field properties window.
OR choose ‘Options…’ which appears for some field codes.
Now you can see more General Switches or formats.
Field Specific Switches
The Field Specific Switches tab shows the options and their field codes
If you want to learn more about field codes and switches, this dialog is a good way to understand the options and the matching switches.
Typing field code curly brackets
The curly brackets/braces you see aren’t the normal you can type from the keyboard.
Make the field code brackets by pressing Ctrl + F9
The Insert | Field command is a more reliable way to start a new field code.
Convert a field to text
Sometimes you want to remove the field code and leave only the result. Do this so the field code isn’t updated any more.
A common use for this is the DATE or PRINTDATE fields which you may want to stay fixed at the current date and not change.
Microsoft calls this ‘Unlinking’ a field. The rest of us would say it’s converting a field code into it’s result or text.
Unlinking/converting is only available via the Ctrl + Shift + F9 shortcut.
Locking a field
The alternative to unlinking or converting a field is to Lock it.
Lock a field: Ctrl + F11
Unlock a field: Ctrl + Shift + F11
Locking a field prevents the field from being updated while retaining the field code. That means the displayed result of the field won’t change until the field is unlocked and updated.
A locked field has the Update Field option greyed out.
Whether you use unlinking or locking is up to you.
Personally, for the final version of a letter or other important document, we use Unlinking. That especially applies to dates. All manner of confusion, embarrassment and accusations can arise if an important past letter appears with the wrong date, because the Word field code has been updated. Unlinking ‘fixes’ the date shown in the document with no risk of accidental updating.
How to Automate Microsoft Word by Inserting and Updating Fields
by Avantix Learning Team | Updated March 14, 2021
Applies to: Microsoft ® Word ® 2010, 2013, 2016, 2019 or 365 (Windows)
You can create dynamic components in your Word documents by inserting and updating fields. When you use built-in commands and features, many Word fields are inserted automatically. For example, if you insert a dynamic date or page numbering, Word inserts fields in your document. Essentially, fields are variables that are inserted using field codes. Update your fields and your document updates automatically!
You normally see the result of a field or variable rather than the codes but you can display field codes. In this article, we’ll discuss inserting and updating fields but, as you get more comfortable with fields, you can edit the field codes directly and even apply different types of formatting using switches.
Note: If you are working with fields in Microsoft Word, you will be using quite a few function keys (such as F9). On some laptops, you will need to press the Fn key on your keyboard to enable your function keys. For example, instead of pressing F9, you would press Fn + F9.
Do you want to learn more about Microsoft Word? Check out our virtual classroom or live classroom Word courses >
Where is the Insert Field command?
The Insert Field command is hidden in the Ribbon so it’s a bit difficult to find.
To access it, you’ll need to click the Quick Parts button on the Insert tab. The Field command appears in the drop-down menu as follows:
The Field dialog box appears as follows in Microsoft Word:
Inserting a field using the Field dialog box
To insert a field using the Field dialog box:
- Navigate to the location in the Word document where you want to insert a field.
- Click the Insert tab in the Ribbon.
- Click Quick Parts. A drop-down menu appears.
- Select Field. A dialog box appears.
- In the list of Field names, select a field. You can filter the list by clicking the down arrow in the Categories list and selecting a category first.
- Under Field properties, select any properties or options you want.
- To see the codes for a particular field in the Field box, click Field Codes. For some fields, this button is clicked by default.
- Ensure that Preserve Formatting During Updates is checked so that formatting you apply is not removed when the fields are updated.
- Click OK. The field is inserted into the document.
- Format the field results by applying text formatting to the field using the Home tab in the Ribbon.
Viewing or hiding field codes
You can view or hide field codes in your document by pressing Alt + F9. Field codes appear between braces or curly brackets .
When you view field codes in your document, fields appear as follows:
- FIELD NAME is the name that appears in the list of field names in the Field dialog box.
- Properties are any instructions or parameters that are used in a particular field. Not all fields have properties or parameters and, in some fields, parameters are required.
- Optional switches are any optional settings that are available for some fields. Switches are another way of formatting specific fields.
You cannot insert a field by typing field code braces or curly brackets on your keyboard. To insert field code braces, press Ctrl + F9 to insert the braces and then you can type the remainder of the field using the correct syntax.
Editing a field in the Field dialog box
To edit a field in the Field dialog box:
- Right-click the field and then click Edit Field. A dialog box appears.
- Change the field properties and options.
- Click OK.
For some fields, you must display the field code first to edit the field. To display all the field codes in the document, press Alt + F9. Be sure to hide the field codes later by pressing Alt + F9 again.
Some fields are edited in their own dialog boxes instead of in the Field dialog box. For example, if you right-click a hyperlink and then click Edit Hyperlink, the Edit Hyperlink dialog box appears.
Highlighting fields with grey shading
Fields can also be highlighted with grey shading to make them more visible in the document. Normally, when you click in a field, it appears with grey shading.
To change the shading settings for fields:
- Click the File tab in the Ribbon.
- Click Options. A dialog box appears.
- Click Advanced in the categories on the left.
- Under Show document content, in the Field shading list, select Always, Never or When selected (the default setting).
- Click OK.
Below is the Options dialog box:
Updating fields
By default, Word should automatically update fields when a document is opened. Many fields are also updated automatically when you go to Print Preview (click the File tab and then click Print). If you prefer, you can update fields manually.
To update a field manually, right-click the field and then click Update Field or press F9.
To update all fields manually in the main body of a document, press Ctrl + A to select all and then press F9.
Some fields in headers, footers or text boxes must be updated separately. Click in the header, footer or text box, press Ctrl + A to select all and then press F9. Page fields (which display page numbering) do not need to be updated manually (they update when you go the Print Preview).
Locking fields
You can also lock fields to prevent automatic updating of the field. To lock a field so that field results are not updated, click the field, and then press Ctrl + F11.
To unlock a field so that field results can be updated, click the field, and then press Ctrl + Shift + F11.
Subscribe to get more articles like this one
Did you find this article helpful? If you would like to receive new articles, join our email list.
Creating variable fields in Word
You can’t just type in Help+Manual variables as plain text as you can in a PDF template. To use Help+Manual variables in your Word DOCX templates you need to enter the variable in a Word field.
You can enter Help+Manual variables in any Word fields that get resolved to text. Help+Manual will find them and replace them with the variable value when you publish with the DOCX template. However, there are a two field types that you will probably find most useful: Comment fields and document properties.
Comment fields
These fields are best for inserting variables inside paragraphs or other items. Don’t confuse them with the Word comments feature! That is for peer review and is completely different – variables entered in Word comments won’t work.
To enter a comment field with a Help+Manual variable in Word:
1. Open the DOCX template in Word and click in the place where you want to insert the variable.
2. Select the Insert tab in Word, then in the Text group select Quick Parts > Field to open the Field dialog.
3. Select Comments in the Field names: box, then type in the Help+Manual variable in the New comment: box, using the format .
Document properties fields
You can see examples of these fields in some of the standard DOCX templates included with Help+Manual. They are used for the Title, Author, Year, Abstract and Company Information items displayed on the cover page, for example.
To enter a document properties field with a Help+Manual variable in Word:
1. Open the DOCX template in Word and click in the place where you want to insert the variable.
2. Select the Insert tab in Word, then in the Text group select Quick Parts > Document Property and then the property you want to insert.
3. This inserts the property item as a box on the page containing a field. Then type in the Help+Manual variable in the empty field, using the format .
There are many uses for fields in MS Word. You can, for example, use SEQ codes to create automatic numbering which can be extremely helpful in the business world and in academia.
- Then there are the Fill-In fields, which you can use in a template. You know, say a form that you use in your business all the time wherein the user enters variables throughout the document. Some folks might compare this feature to the keyboard merges in WordPerfect.
Most often, folks insert fields in their documents using the Fields dialog. The easiest method to do this in version 2010 is to use the keyboard combination shortcut of Alt + I + F.
In earlier versions of MS Word, you used to access the Fields command by clicking on your Insert menu. Now though, you have choices!
The Field command can now be accessed in a couple of places:
- The Insert tab;
- The Text Group;
- In Qick Parts;
- On the Mailings tab; and
- On the Write & Insert Fields Group.
In order for your Fill-In fields to work for you, you must do the following:
- Embed them in a template;
- Put the template in the default template location in Word; and
- Open a new document based on the template.
- To open a new document based on the template, click on File tab | New.
Let’s have a go at it shall we?
- Simply start with a blank document or, if you prefer, with a form you have already created.
- Position your cursor where your first variable information should be inserted.
- Open the Fields dialog by clicking Alt + I + F.
- Find the Fill-In fields command.
- You can now add a specific pompt as a guide to users.
- You can also set up a default response if you like, which will be inserted automatically into the document if the user should leave that field blank.
- Simply click OK or tap your enter key.
- A prompt box will appear, but since you are still creating your template, do not key in anything in the box.
- Click OK and the code will be inserted at your cursor position.
- Unless you specifically elect to display your codes while creating your template, you will not be able to see them so it would be a good idea to have them displayed so you can see what you are doing. To display your codes, click Alt + F9.
Continue inserting your Fill-In fields where appropriate and when you are finished, save your document as a template. - To save your document as a template:
- Click the File tab on your Ribbon or use the shortcut Alt + F (not simultaneously),then click Save As or the letter A.
- It is very important that you save your Word 2010 document as a template (*.dotx) or as a Word 97-2003 template (*.dot).
- After you have saved your template, users will be able to create a new document based on it by clicking on File | New | My Templates.
- Once you see your template, double-click it or click OK.
- When your document opens, the first prompt will appear. Key in the variable information and click OK.
- Continue through your document doing the same for each prompt.
Once you have keyed in all the variables in your document, you will be returned to your doucment where you can make any changes you deem necessary.
I can think of many, many instances where you have a document with boiler-plate language and only a few variables, such as contracts, Last Will and Testament, Powers of Attorny, etc.. Just think of the time and effort you could save using these fields!
Office Tips For Your Office Success
The other day a colleague of mine had a question about numbering. She was writing a rather long document and wanted to do (or have) few things in her document:
1. To number paragraphs automatically,
2. To start numbering from a given paragraph number.
How? It is easy. Let see how to do that.
First, let me explain a little more about Fields and associated options. There are not many of them and knowing fields better will help you creating better documents and save your time.
Here is the document and I want each article to have its own number, starting from number four (4). I also want Word to number paragraphs automatically when I copy/paste the text “Article 4” by increasing number 4 by 1 (one).
Sure, I can copy/paste the text “Article 4” and change the value manually. But what would happen if I had a hundred (200) articles and wanted to delete Article 9? I would have to correct all remaining values to correct sequence number: I would have to make 91 corrections. And I would have to do that each and every time I add or delete an article.
Imagine what would you have to do if Word was lacking its page numbering feature? I don’t want even to think about it. You would have to manually correct page numbers every time you add or delete a page. That’s exactly the same. (Believe it or not, I remember typing on a typewriter and making a mistake, adding and throwing pages away, making corrections and typing into the night…)
I can’t use Numbering feature here because the text would look like this:
Fortunately there are Fields to ease our tasks, to automate and enhance documents. There are lot of them, and and we are going to meet some. This time the ones that deal with numbering.
To have auto numbering feature automatically update a number we need to insert Field first.
1. Type a text, for example, Article, and press Space to separate the word from the field.
2. Go to Insert tab, click Quick Parts and choose Field…
This opens the Field dialog box:
This dialog box has two parts:
1. Narrower part on the left, where you choose a field from a list of available fields. On the top there is Categories pull-down menu that can help you narrow down the field list. Description is on the bottom.
2. Wider part on the right, where you can change Field Properties of the selected field.
Word 2010 has 9 field categories and 77 fields.
Click on Numbering category to filter and display fields that are related to numbering.
Take a look at the Field Names on the left. Have you noticed something familiar? No? Take look again.
AutoNum is selected and first in the list that look familiar. Click on Page field. Familiar too? Yes! These features you were using are Fields actually!
Numbering and Page Numbers are fields and we were using them without even noticing!
Like two mentioned before, you’ve heard of other well known fields: table of contents, total number of pages, outlined numbered lists, date and time, index and tables, mail merge and others. In fact, all Fields have a shared feature (guess what ): they are updated automatically!
Two examples are shown below:
Back to our Field dialog box.
On the left click ListNum. This is the field we were looking for and it has some “switches” and “levers” we can pull to make some adjustments to fit our needs.
Now you have Field Properties and Field Options. Field Codes button on bottom left is used to reveal Field Codes of the selected field. Fields are, essentially, data placeholders and Field Codes define what data fields are made of and what kind of data is filled and updated in it.
When pressed, Field Codes button changes to Hide Codes button and reveals Advanced Field Properties that displays (1) Field Codes for the field, (2) field syntax, and (3) Options… button.
Options button reveals Options dialog box specific for the chosen field where you can adjust its various options.
Dialog box on the left displays Field Option specific to ListNum field.
Different fields have different field options.
Four different Field Properties control type of numbering displayed in the document:
In combination with Level in the list Field Options, the results are as follows:
by Megan Casey 25 January 2020
Once you start delving into Word, you find it can do all sorts of things that you wouldn’t expect. One of these is that it can be used to create barcodes, and it’s surprisingly easy to do. Once you’ve made your barcodes, they can be scanned with any barcode scanner or an app on your smartphone.
There are many different types of barcodes, but this article will focus on one of the most common and easiest to use – Code 39 or ‘old fashioned’ line barcode. Modern, square QR codes are also possible in Word and Office with many clever uses.
Code 39 barcodes are used to label goods in many industries, and allow you to use both digits and characters. The main limitations of Code39 barcodes are length (originally they could only encode 39 characters, but that has been increased to 43) and they cannot handle special characters.
There are three main steps to creating barcodes in Word:
1. Download and install the appropriate barcode font.
2. Format your text correctly.
3. Apply the barcode font to the text.
Download and Install a Barcode Font
There are plenty of font websites that supply barcode fonts. There are free barcode fonts available, but some work better than others. If you have trouble finding a free barcode font that works well, it may be worthwhile paying through a commercial font foundry.
Free fonts seem to come and go, but we found this one that works for Code 39 barcodes:
When you download a font, it usually comes enclosed in a zip file, so you will need to extract the files using WinZip or another zip file extractor program. If there is more than one file in the folder, the one you are looking for is the one with the .ttf extension (TrueType) or .otf (OpenType)
To install the font once you’ve extracted it, double-click on the .ttf/.otf file and click Install in the window that opens. It’s no different to any other Windows or Mac font install.
You may need to close and reopen Word for the new font to show up in your font list. Like any other font, it will simply appear in the alphabetical dropdown list of fonts. Some barcode fonts may only display as a barcode in the list; if so, you can hover over it to see the name of the font if you have more than one.
Format Your Text Correctly
Barcodes only work if the text they are created from is formatted in a certain way. This is generally pretty easy though, and there are websites out there to help you for the barcodes that require trickier formats.
Code 39 barcodes can only be used for short, fairly simple barcodes, the formatting rules are also fairly simple. The only characters that can be encoded with a Code 39 barcode are uppercase letters A-Z, numbers 0-9, the symbols hyphen (-), period (.), dollar sign ($), forward slash (/), plus (+) and percentage (%), and a space, which must be replaced with an underscore in your original text (_).
It also requires an asterisk (*) at the beginning and end to indicate the start and finish of the barcode.
For example, if we are using our barcode to label some clothing products with their prices, our medium red shirt could be barcoded using the text:
*Red_Shirt_M_$40*
Apply the Barcode Font to the Text
Now that you have the text that you want to turn into a barcode in the right format, select the text and first increase it to a fairly large font size, the biggest you can make it while keeping the text on one line. Otherwise the barcode may be too small to scan. Then with the text still selected, go to Home | Font and select your barcode font.
Your text will now be replaced by a barcode:
Scanning Your Barcode
You don’t need a physical barcode scanner to check that your barcode works, and you don’t need to print it out. It’s best to test barcodes on the device that will usually read them (checkout / hand scanner etc). There are lots of barcode scanning apps available for smartphones, so just search in the App Store or Google Play Store to find one for your phone. You can then use the app to scan the barcode straight off your computer screen to make sure it works before you print it.
The barcode we created above looks like this when scanned on my Samsung phone:
Other Barcode Types
There are many other types of barcodes available for various industries and uses. Code 128 is another common one which can be created through Word in a similar way to Code 39. The formatting of the text for a Code 128 barcode is more complicated, but ID Automation provide a handy tool that will encode the text for Code 128 and other barcode formats. They also provide commercial barcode fonts with a demo version available for you to test out before you buy. With these two tools, the process will be basically the same as described for Code 39, except for the extra step of copying your text into their tool to encode it, and then back into Word to create the barcode.