Questions tagged [field-codes]

Field codes are used as placeholders in Microsoft Word to put dynamically changing text, such as the date and time, into a document. They’re also used for fields to support mail merge of form letters, labels, etc.  Use this tag for questions about manually creating fields to achieve a specific effect, or managing fields automatically created and inserted by Word (e.g., figure and table numbers).  Also use the tag for your version of Microsoft Word.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

Show page number formatting in TOC

I've searched...not sure there is a way to do this. -I have a doc set up with a multi-level list and headings - works and looks great. -I have formatted my page numbers to include the chapter number ...
0 votes
1 answer
77 views

Microsoft Word | Adding a word to a numerical field

I have a numerical field: SEQ Equation \* ARABIC \s 1 I want to sub-sorting specific equations by adding a,b, and c. For example: (1.5.a) (1.5.b) (1.5.c) (1.6) (1.7) Is there any trick for it? ...
1 vote
1 answer
90 views

MS Word Field to Calculate Total Number of Credits in Exam

I am drafting an exam and I know how to create my own counter for the separate questions. I did this with Strg + F9 and {seq questionno}. I have also added text boxes to the lines with the number of ...
0 votes
1 answer
104 views

How to modify field code to include sub-sub-sections and text in the text body?

Is there a way to cross-reference a section, chapter or heading in word with more than one sub section, e.g., Section 3.4.4.2? I figured out how to include text within the hyperlink with this code (...
0 votes
1 answer
246 views

Can I autonumber a sequence *within* a paragraph?

I have a set of several factors I need to repeatedly analyze and discuss -- as applicable -- to different sets of facts. For instance, if I were declining to admit dogs to my obedience school, I would ...
0 votes
1 answer
142 views

Microsoft Word: how to cross-reference an autonum field?

I'm writing a survey questionnaire and use autonum fields for the question numbers. Say the 12th question is "Q{autonum}. Cats or dogs?", which Word shows as Q12. Cats or dogs? Later on I ...
2 votes
4 answers
15k views

How do you copy raw Microsoft Word fields codes to another text document?

Is it possible to copy text from a Word document containing field codes, so that when pasted into another application, the FIELD CODES REMAIN AS RAW TEXT, i.e. something like This is about ...
-1 votes
1 answer
1k views

MS Word - field code of file name without file extension

I want to have a field code in word that is the filename, but without the file extension. This is as a reference in the footer. The document reference is the same as the document filename, but without ...
0 votes
0 answers
148 views

How to bulk import bookmarks into Microsoft Word?

I can add a field anywhere with CTRL F9, then write inside braces: SET Test "this is a test" \* MERGEFORMAT and use it with the field REF Test which is displayed this is a test. Note: I am ...
0 votes
1 answer
340 views

How can one paste bookmark references or fields as plain text in Word?

I have a Word document with fields wherein text is generated by other parts of the document. I would like to be able to paste some parts of that document as text, so that the fields don't display the &...
1 vote
1 answer
619 views

Adding a word count field code for specific pages

I would like to add a word count on the front page of my document, but counting only the words on page 3-10. I think I'm looking for a field code like this {NumWords} {#Page 2-10}
0 votes
2 answers
2k views

Shortcut to custom document properties in Word

I often need to edit the values of several (around five) custom document properties in Word documents. In order to do that, I need to do this: Is there a shortcut to do this faster? I'm hoping for a ...
4 votes
3 answers
45k views

How to prompt for information when starting a new document from Microsoft Word template

I want to create a field in a template (dotx) that, when starting a new document from that template, would prompt for information. The field is something that repeats over and over in the document. I ...
0 votes
1 answer
342 views

STYLEREF "Headline 3": Numbered 2.1.3 how to get only the last level number (3)

I have a numbered list with 3 levels: 1 Title ... 2 Title 2.1 Title 2.1.1 Title #1 2.1.2 Title #2 2.1.3 Title #3 ... 2.2 Title 3 Title My target is to get automatically the correct number after #... ...
0 votes
1 answer
78 views

STYLEREF "Headline 2" reporting also the number above

I have a numbered list with 2 levels: 1 Title ... 2 Title 2.1 Title: I want #1 ... 2.2 Title: I want #2 3 Title My target is to get automatically the correct number after # I tried using: STYLEREF &...
0 votes
0 answers
989 views

MS Word: "Update all fields" seems to be corrupting fields in text boxes

I'm afraid I'm on the verge of a catastrophe. I have a very large Microsoft Word document (nearly 500 pages), and I'm finding that every time I "update all fields" by the Ctrl-A, F9 method, ...
1 vote
1 answer
319 views

Word: how to prevent line break in fields? No VBA

I am preparing a Word document with fields that may be located anywhere and may contain spaces and dashes. So, a field may be line broken when located at the end of a line. I need to get rid of this....
0 votes
2 answers
655 views

Two switches do not work together in the mergefield field (\b and \@) for a date

When I separately use the b switch or the @format switch on the mergefield field they work perfectly, but when I try to use them together the b modifier doesn't work. In the images above the code is ...
0 votes
1 answer
2k views

use database field in word to query excel file

{DATABASE \d "C:\\Users\\Phoenixmoto\\Desktop\\Movies.xlsm" \s "SELECT Title, Genre FROM [Movies$]"} This field code delivers a field with serial numbers i.e. FilmId column from ...
16 votes
3 answers
42k views

Word Syntax Error with NumPages and Formula

I'm trying to use the following as a field in word: { = { NumPages } - 1 } And I get the following error: !Syntax Error, { I seem to be using the right format per Microsoft. Any ideas? Thanks ...
0 votes
1 answer
126 views

Word field code can't calculate date less than 17 days out

I grabbed a bit of code to add in Word to calculate a date X days out from today's date: {QUOTE {SET Delay 17} {SET a{=INT((14-{DATE \@ M})/12)}} {SET b{={DATE \@ yyyy}+4800-a}} {SET c{={DATE \@ M}+12*...
37 votes
7 answers
117k views

Powerpoint: how to insert document property (aka 'field') in slide?

How can I insert a document property (e.g. the author's name) in a slide in PowerPoint 2007? I know this can be done in Microsoft Word, but I can't find how to do it in PowerPoint. (The idea is that ...
1 vote
1 answer
283 views

ASK fields do not update bookmarks in Microsoft Word template

I am creating a template document for my office that uses a series of ASK fields to populate some bookmarks with pro-forma content. The only VBA in the template is used to update fields on a new ...
1 vote
1 answer
1k views

Linked Excel 2010 Charts Won't Show Field Codes in Word 2010 - What am I doing wrong?

Thank you for reading. I hope this is something simple I am overlooking. Synopsis: I have a Word doc containing linked charts from a single Excel source. They are docx and xlsx files created in Word ...
101 votes
7 answers
243k views

How do I update all fields in a Word document?

I want a way of updating all fields in a Word 2013 document. (If it works in other versions, all the better; I originally had this problem with Word 2007, and nothing seems to have changed since then.)...
0 votes
1 answer
39 views

Rogue header and page number in Word 2016 lands in the text area and won't go away (Track Changes?)

Working in a Microsoft Word 2016 document. Track Changes has been on through a couple of saved versions of this document. I noticed that a header, including its page number field code, has appeared ...
1 vote
2 answers
4k views

Word fields - IF statement not working as expected due to quote/speech marks

I've got a couple of merge fields that are using this syntax { IF {DOCVARIABLE "variable1" } = "" "" "(the {QUOTE 34}{DOCVARIABLE "variable2" }{QUOTE 34})" } If variable1 is empty, it should do ...
1 vote
1 answer
600 views

SET field codes in MS Word calculates a sum instead of keeping text

For getting the result in Figure 1, I input the field codes in MS Word as Figure 2. However, the result shows as Figure 3. In fact, I want to store the result "1-3" in the bookmark xxx using ...
0 votes
1 answer
136 views

Word has moved my document text *inside* a field code. How do I get it back?

OK. Random question, somehow, word has managed to move the entire contents of my document (7500 odd words including assorted field codes for a citation manager) into a field code that stretches over ...
0 votes
0 answers
49 views

Access index entry and subentry values with field commands

MS Word offers the capability of creating a list of acronyms using the index function in the references menu. I infer that at some level, Microsoft Word appears to use Fields to manage the entry and ...
0 votes
1 answer
819 views

How to refer to a cell from word table outside of table?

{ IF { COMPARE wow A2 > 10 } = 1 "working" "not" } Here "wow" is bookmark to the table. Value of cell is 8 so if field should return "not" but returning &...
0 votes
0 answers
1k views

Word - Numbering of indexed items are in descending order in the index (instead of ascending)

I was trying to help a friend with a problem he has using the index of MS Word. The index shows the items with the correct justification, but there are two weird phenomena: The numbering are in ...
2 votes
0 answers
32 views

Heading Numbers on the Rise Side

I desire to create a heading style so that each heading is automatically enumerated and multileveled, but the numerbs appear on the right side of the line whereas the words appear on the left. Example:...
1 vote
1 answer
296 views

Force the chosen Locale for a field with numeric data or formulae in Word

I've a simple function: {=B2*C2 \# "-#.##0,00"} in a table in Word. However, this gives the result as 2.345,67, because I live in The Netherlands. Now I need to share this document with ...
2 votes
1 answer
248 views

Display the maximum value of a SEQ field

When inserting tables in a document, I use a header such as : Table 1 - Title If the table is bigger than one page I use a header on each page, page 2 of 3 for the table will have : Table 1 - Title (2/...
0 votes
2 answers
680 views

How to use Toggle Field Code to halve the "PAGE" & "NUMPAGES" variables - (Microsoft Word)

I want to have my footer count every second page (so that when I print doubled sided paper, each sheet of paper will be counted as 1 page) _ Normally page footers would look like; page 1, page 2, page ...
0 votes
1 answer
40 views

REF field omits nbsp in formatting

I'm trying to cross-refer a figure and apply some simple formatting to the cross-reference like this: ...as shown in Fig._{ REF _Ref30011011 \# "0,_c" \h }. which should result in ...as shown in ...
0 votes
1 answer
1k views

Open Word Document Without Updating Fields

We have some documents with Date fields (field code: DATE \@ "dd MMMM yyyy") in our document store. When opening those documents, Word automatically updates the field to show today's date rather than ...
1 vote
1 answer
250 views

Sum up field codes not working right

I have values brought into a Word from another software in this format: example 1: 2 000,00 $ example 2: 50,00 $ example 3: 211,50 $ Since Word does not allow to do maths on numbers of that format, ...
0 votes
1 answer
5k views

Outlook: what variables are available in Quick Steps?

In Outlook (2016) what variables and/or formatting codes are available for use when creating a Quick Step? For example in "Forward" the provided subject line is FW: <subject>. I'd like to ...
0 votes
0 answers
369 views

How to assign text to Field codes

Aside from using a Macro as suggested here or the very clumsy 'Advanced Property' Dialogue how can a simple user populate/add/set the value of a field code? I have a document with cover page and the ...
5 votes
5 answers
93k views

How do I turn a table of contents into plain formatted text?

How do I turn a table of contents into a plain formatted text without field codes? I want to cut it away from the rest of the doc as an outline. I'm using Word 2011 on a Mac.
5 votes
2 answers
48k views

How do I remove all field codes from a Word document

Field codes often find its way into Word documents (e.g. graph references, citations etc.). When we want to submit the completed document to someone else, often it would be necessary to remove field ...
0 votes
1 answer
2k views

Field code in Word that is conditional based on the presence of a style

I have a Word template with a special table of contents associated with an "Appendix" paragraph style. Sometimes documents that use the template will use that style and sometimes they don't. The ...
3 votes
2 answers
3k views

Word: how to find `_Refxxxxxxxxx` codes for manual cross-referencing?

When I use the Cross-reference dialog for figure and table cross-references, Word creates a new field with a reference number, e.g.: { REF _Ref530727267 \h } How can I get the _Refxxxxxxxxx codes ...
0 votes
1 answer
71 views

How to convert a search string to a field?

I have a document with many occurrences of INCLUDEPICTURE "imagename.png". Instead of having to select the text and press Ctrl+F9, I want to do it automatically. Is it possible to convert the pattern ...
1 vote
1 answer
3k views

Concatenate to a field without using a separate field?

How can I concatenate a space to a mail merge field in Word? Ideally: The space should be part of the field The space should be omitted if the field is empty
0 votes
0 answers
114 views

MS Word 2013 | IncludeText contains paragraph marks invisible to VBA

In a Word 2013 document I have an INCLUDETEXT field followed by some text: |--THE FIELD ↓------------| |---------SOME TEXT ↓---------------------| { INCLUDETEXT MyFile.docx } A quick brown fox jumps ...
3 votes
2 answers
5k views

How to permanently format the field "Ref" to avoid unwanted spaces after cross reference in Word 2010?

We have a Word 2010 document where we want to insert cross references to headings. When inserting a cross reference (insert -> Cross Reference -> Heading -> Heading (no context) -> ok), the field ...
2 votes
1 answer
5k views

Insert Mergefield conditionally based on other Mergefield - MS Word

In MS Word '16, I'm trying to insert a Mergefield based on a Mergefield, but I can't seem to get the syntax correct. { IF { MERGEFIELD A * MERGEFORMAT } = "RP2" "{ MERGEFIELD B * MERGEFORMAT }" "{ ...