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
2 answers
42 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 ...
user avatar
  • 91
0 votes
1 answer
26 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 #... ...
user avatar
0 votes
1 answer
20 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 &...
user avatar
0 votes
0 answers
45 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, ...
user avatar
1 vote
1 answer
44 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....
user avatar
  • 121
0 votes
0 answers
13 views

Formatting issues with Database field into Word document

Is there a way to prevent the carriage return that appears at the beginning of a field imported into a Word document using the Database field? Or is there a switch or another type of field that will ...
user avatar
  • 1
0 votes
2 answers
67 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 ...
user avatar
0 votes
1 answer
30 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*...
user avatar
  • 274
1 vote
1 answer
45 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 ...
user avatar
0 votes
1 answer
17 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 ...
user avatar
1 vote
1 answer
162 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 ...
user avatar
  • 113
0 votes
1 answer
30 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 ...
user avatar
  • 203
0 votes
0 answers
24 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 ...
user avatar
  • 148
0 votes
1 answer
194 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 ...
user avatar
0 votes
1 answer
131 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 &...
user avatar
2 votes
0 answers
24 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:...
user avatar
  • 21
0 votes
0 answers
398 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 ...
user avatar
  • 118
1 vote
1 answer
95 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 ...
user avatar
  • 1,381
1 vote
1 answer
79 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/...
user avatar
0 votes
2 answers
315 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 ...
user avatar
  • 3
0 votes
1 answer
38 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 ...
user avatar
0 votes
1 answer
628 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 ...
user avatar
  • 1,106
1 vote
1 answer
81 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, ...
user avatar
  • 31
0 votes
0 answers
65 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 ...
user avatar
  • 271
0 votes
1 answer
48 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 ...
user avatar
  • 103
0 votes
0 answers
92 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 ...
user avatar
  • 45
2 votes
1 answer
3k 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 }" "{ ...
user avatar
3 votes
2 answers
2k 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 ...
user avatar
0 votes
1 answer
717 views

How to insert multiple field codes to same field in MS Word?

I am trying to achieve following numbering scheme for a loooon word document: [Section 1] [formula] (1.1) [formula] (1.2) [formula] (1.3) [Section 2] [formula] (2.1) [formula] (2.2) [...
user avatar
0 votes
1 answer
74 views

MS Word: Insert a page of a field selection in

I would like to know if there is a way to insert text or a page based off field selection in Microsoft Word? I am working on a template that when opens: 1. Prompts for name of project, and parts ...
user avatar
0 votes
1 answer
434 views

cross reference content from current word forms

with the legacy word form I could insert a formtext field { FORMTEXT } and show the content in a new place by using a new field { REF text1 \h } where is the name text1 and which is automatically ...
user avatar
  • 111
0 votes
2 answers
2k views

Word: How do I find all locked fields in a document?

is it possible to get a list of all the fields I used in a word document? I want to find out which field is locked without going through each field separately. Something similar to the the list when ...
user avatar
  • 7,970
0 votes
1 answer
52 views

Why is there no entry to show/hide the field code in the (mouse) context menue for certain fields (word)?

To show/hide the field code of a single field I usually use Shift+F9. But sometimes I need the context menu (for example when working with a tablet with a screen keyboard that does not have the "F"-...
user avatar
  • 7,970
1 vote
2 answers
926 views

Controlling the formatting of seq fields inside word equations

So I have several appendices that look something like this: Appendix A: Equations Appendix B: Sample Calculations etc. The letter is controlled as such: Appendix [{seq AppL \*ALPHABETIC}]: Example ...
user avatar
  • 21
0 votes
1 answer
53 views

select data based on value of a field

I have a file with several entries providing IDs and another file with other entries subdivided in different fields separate by a TAB. I need to select the records of the second file based on matching ...
user avatar
  • 101
1 vote
2 answers
152 views

{page} variable in Word 2016 not updating in a formula

In a footer in Word 2016 (Windows 10), if I place {page} on its own, it updates correctly; however, if I place it in a formula like {={page}*2}}, it only displays the correct value on the first page ...
user avatar
0 votes
1 answer
4k 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 ...
user avatar
  • 4,835
0 votes
1 answer
339 views

Can I build a Word mergefield using other fields to complete the name?

I have a list of images (one per state) that I need to pull into my template and normally use a regular mergefield e.g., {MERGEFIELD "Image_FL_09252017"}. The image name is a combination of the state ...
user avatar
0 votes
1 answer
458 views

Field code IF statement not working

I have a simple IF statement which should be checking whether a docvariable is set to YES or NO. Regardless of whether it's Y/N, the document is including the "Some text here" part and the second ...
user avatar
0 votes
1 answer
699 views

How to remove soft line break in the field that from styleRef in Word 2013?

I create a header in WORD 2013 that contain a field from my chapter style ref. The problem is chapter title has a soft line break, I want to remove it in header, how to do it?
user avatar
0 votes
2 answers
467 views

MS Word - Quick Parts' field update

I have a MS Word protected document with some locked parts (not editable by users) and some editable fields (inserted by Quick fields> Field) that resume the value of some document properties (...
user avatar
2 votes
1 answer
497 views

Word 2016: Using StyleRef for Heading #s in Header differently

I have a document that requires the heading to contain the item number (level 3 heading) that is being continued onto that page from the previous page. Using the Field insert and StyleRef, I can make ...
user avatar
2 votes
1 answer
634 views

Conditional field in MS Word

I want to insert a field in the footer that will display the text "hello" if the page number is lesser than or equal to 2, and "bye" otherwise. How to do it? I have tried IF {PAGE}<=2 "hello" "bye"...
user avatar
1 vote
1 answer
2k 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
user avatar
2 votes
1 answer
532 views

MS Word 2013 | Create custom Field Code

I have a document in which I make heavy use of references to tables, graphs etc. like so: (see Table 25, page 236). This is a piece of text with two fields in it. Now, the Create a Cross-Reference ...
user avatar
  • 45
1 vote
0 answers
128 views

Why does Word 2016 remove Field Code switches in .odt?

When editing .odt files in Word 2016 using the { [REF] Bookmark [Switches ] } field code the document seems to work fine. For example referencing 1.2.3.4 Heading with { REF _Ref1234 \w } results in 1....
user avatar
-1 votes
2 answers
499 views

How to insert line break in Word cross-reference

I have a cross-reference to heading text with a long heading, and I want to put a line break in the middle to make it more readable. What I tried: - Putting the cursor where I want the break and ...
user avatar
  • 159
1 vote
2 answers
3k 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 ...
user avatar
1 vote
1 answer
3k views

Word macro to auto-update formula field without Ctrl+A, F9

I want a formula field to update automatically when its source field (another row in the same table) is updated, without having to update/recalculate the field value by pressing F9. Is this possible? ...
user avatar
0 votes
1 answer
420 views

Word 2017 won't Find/Replace text within field

I have a MS Word 2016 book manuscript with lots of citations. I'm using the APA Style but want vary from it to suppress the year in citations for authors with only one entry in my bibliography. E.g., ...
user avatar