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.

A field code is used in Microsoft Word to put dynamically changing text into a document, such as the date and time, number of pages, file-save-date, etc. They're also used for fields to support mail merge of form letters, labels, etc.

They can be manually inserted during editing, or automatically created and inserted by Word as the result of certain commands. They can also be used to perform complex operations, such as mathematical calculations or cross-referencing data in another file.

Field codes can also be added to documents using Visual Basic scripting in which case they are referred to as “Document Variables”, but they behave in largely the same way as field codes.

More information can be found by using the Help function in Microsoft Word and searching for “field codes”.

119 questions
102
votes
7 answers

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.) This includes cross-references, page numbers,…
39
votes
7 answers

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 with a document property it is easy to change e.g.…
Rabarberski
  • 8,800
23
votes
6 answers

Is there a Keyboard-Shortcut for updating all fields, tocs and indexes in MS Word 2011 Mac OS X?

I know it's possible to have MS Word 2011 update all fields before printing a document but I would like to be able to update the fields whenever I feel the need to. Is there a keyboard short cut for this for MS Word 2011 on Mac OS X?
17
votes
3 answers

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 as always.
Mark Williams
  • 588
  • 6
  • 10
  • 17
9
votes
1 answer

Adding custom text to a Word cross-reference field

I've got a very long document that uses multi-level numbering. I'm wanting to include cross-references (with hyperlinks) back and forth to particular sections, and I've been using the standard Word cross-referencing feature, which adds fields like…
John
  • 465
8
votes
4 answers

Microsoft Word 2007 opening all docs with field codes toggled off

Recently, something changed with my Microsoft Word 2007 installation/preferences on Windows XP, such that whenever I open a word document, all the field codes are displayed raw instead of as their expanded value. For example, my header reads: My…
WilliamKF
  • 8,058
5
votes
5 answers

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
1 answer

How do I avoid broken cross-references when moving figure captions?

In MS Word, I often find that moving figure captions in a document breaks cross-references to the figure number. Below is a simple example, in which a caption was added by right-clicking on an image, resulting in a {SEQ Figure \* ARABIC} field in…
Deditos
  • 983
5
votes
2 answers

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 codes to prevent them from showing up as errors on…
RJ-
  • 981
4
votes
1 answer

Microsoft word 2013 - if statement not working

I have a field code with a strange behavior. When I put the code, { IF NUMPAGES=NUMPAGES "A" "B" } I get A as expected however, when I reverse this, ie { IF NUMPAGES<>NUMPAGES "A" "B" } I still get A. Why is this happening?
4
votes
3 answers

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 want to be able to enter it once and that it…
valentinas
  • 173
  • 1
  • 1
  • 5
4
votes
0 answers

In MS-Word DDE doesn't return results or errors

I have a client reporting their system doesn't work with my DDE Server. First time facing this kind of issue, so I hope you have some input as how to find the culprit. Version used is Office 2024 LTSC. The baviour is something I have never faced…
4
votes
2 answers

Is there a Word field code for the folder path?

In MS Word you can insert a field code to show the document file name with the option to include or not the full path. What I want is to only insert the folder path excluding the file name. Macros are not an option. Can this be done? Is there an…
Shevek
  • 16,738
3
votes
1 answer

In Microsoft Word, can I show Heading1 > Heading2 breadcrumb navigation in the header/footer?

In Microsoft Word (2016), I want to be able to specify a header with a sort of breadcrumb navigation showing the previous titles / heading text, to give the reader an overview of where you are in the document. For example, say you have top-level…
Dr. ABT
  • 133
  • 6
3
votes
2 answers

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 shows the specific heading number, but 2 spaces are…
1
2 3 4 5 6 7 8