Updating Fields Not Working Across Sections

The attached document contains some fields codes used to calculate page numbers (these are defined in the contents page)

If I update all the field codes in the document:

$wordsApi->updateFields( new UpdateFieldsRequest($remoteFileName, $remoteDataFolder) );

and then save it as a PDF:

    $result = $wordsApi->SaveAs( new SaveAsRequest(
            $remoteFileName,
            new PdfSaveOptionsData(array(
                "file_name"     => $pdfFileName,
            )),
            $remoteDataFolder
        )); 

The resulting PDF shows that the field codes used in the footers at the bottom of sections 4 to 8 have not been updated and show as ‘99’.

The contents table is correctly updated as are the field codes in the footers of section 3.

19029-attempt-1.docx (386.0 KB)
fieldcodes.pdf (367.8 KB)

I think I fixed my own bug:

Sections 4 to 8 had this as the field code:
{ NumProposalPages * Arabic * MERGEFORMAT }

When it should have been
{ REF NumProposalPages * Arabic * MERGEFORMAT }

Glad to hear you resolved the issue.