# Microsoft Word: Table of Figures Ordering

Super User Asked by ScoopsaHaagenDazs on December 21, 2020

I’m currently working on a report but for whatever reason, when creating a table of figures to go with the images, Microsoft Word gets the ordering wrong:

http://puu.sh/5xWsy/0ee1dd057b.png

I’m not entirely sure why this happens, and I’ve tried re-adding the images and re-adding captions but it keeps happening. It seems a little silly that Microsoft Word can’t even count.

When you add a caption to a floating object, it is added inside a textbox and is created using SEQ and/or STYLEREF fields (it depends on the settings).

Textboxes are not in the text layer of the document, so it isn't immediately obvious how Word sequences them. As far as I know, Word looks at where the textbox is anchored (you can click the "Show" button to see the anchors) and uses the anchors to decide the sequence.

But the other problem is that when you select the "Whole Document", e.g. using ctrl-A, and press F9 to update the fields in the document, the text boxes are not included, so their fields are not updated.

So if you insert 2 figures, then reposition them in any way that results in the second figure's textbox anchor moving above (i.e. earlier in the document) the first figure's textbox anchor, the typical "select the document, update the reference fields, update the ToC" sequence will not work.

I think the following VBA can be used to fix all the textboxes in the body of the document (as opposed to textboxes in other storyranges such as Header/Footer, but I don't think they can have this kind of reference number in them anyway).

Sub updateFigureRefs()
Dim rng As Range
Set rng = ActiveDocument.StoryRanges(wdTextFrameStory)
While Not (rng Is Nothing)
rng.Fields.Update
Set rng = rng.NextStoryRange
Wend
Set rng = Nothing
End Sub


It will actually update all the fields in text boxes, e.g. Table refs. and anything else.

Answered by user181946 on December 21, 2020

I have been trying to reproduce the problems faced by the OP using Word 2007. Using standard Caption options (e.g. both picture and text are aligned to text, and are not free-standing), I could only reproduce the problem when the pictures and/or the text was boxed. By experience I know this problem occurs sometimes, mostly when copy-pasting parts from different documents, but it is difficult to reproduce.

To reproduce the problem:

1. Create a document with some images. For this purpose, I used sample artwork from ClipArt.

2. Change the text molding to Square (i.e. to make it so you can move the pictures to where you want)

3. Add captions. The captions will also be in text boxes.

4. Create the Table Of Figures (TOF).

5. Stretch the 2nd picture box.

The TOF has now the reversed order for the captions.

To fix this, do the following:

1. Select one of the reversed captions' textbox.

2. Select the numbering, then right-click.

3. Refresh/actualize the field. This will make the 2nd caption 1st, as indicated in the TOF.

4. Do the same for the other box.

5. Refresh the TOF. t should show that the stretched caption is 1st, followed by the unstretched one.

With this all you can maybe stretch the textbox of Figure 1, with a transparent background, and refresh the TOF. This should fix it.

Answered by Doktoro Reichard on December 21, 2020

## Related Questions

### Trying to recover a NTFS corrupt partition

0  Asked on December 8, 2020 by abiyi

### How to use Office365 plus addressing?

1  Asked on December 8, 2020 by machiel-visser

### Using rubber to rub contacts of RAM?

2  Asked on December 8, 2020 by alvin-wong

### Cannot calculate times with 12:00 AM

3  Asked on December 7, 2020 by fixdmix

### How to Set WMIC in for loop Flashdrive get model, file system and size in gigabyte?

0  Asked on December 7, 2020 by sopandi_akbar

### MS Word Section Numbering (e.g. A.1.1) includes Chapter (A.1) but not Changing with Chapter Number

2  Asked on December 7, 2020 by nihal-arju

### How to separate taskbar buttons of the same process on Windows 10 taskbar?

0  Asked on December 7, 2020

### windows says wifi has no valid IP address but ipconfig says it does?

1  Asked on December 7, 2020 by kiwel81208

### Error building DRBD 9 from tarball on Oracle Linux 6

0  Asked on December 7, 2020 by christophorus-reyhan

### How can I modify the “schedule scan” to be disabled? (don’t have permission to disable)

2  Asked on December 7, 2020 by rampagediamond

### virtualbox : port forwarding doesnt work

1  Asked on December 6, 2020 by nag

### What is the best way to backup an SSH key in case my hard drive fails, etc?

1  Asked on December 6, 2020 by sidedtech

### multiple man arguments -> multiple files in less

0  Asked on December 6, 2020 by xdhmoore

### Preserve SVG after PDF export from Word

0  Asked on December 6, 2020 by festus

### How to modify these VBA codes to save excel sheet in excel format (.xlsx)?

1  Asked on December 6, 2020 by ramji

### Intel RST driver downgrade safely?

0  Asked on December 6, 2020 by legolas

### Windows PowerShell – How to view commands history date/time

5  Asked on December 6, 2020 by ramin

### Delay in starting command prompt

0  Asked on December 5, 2020 by batchcoding____s