Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
To update fields of Word Document using Aspose.Words Java Apis in Php, simply invoke updateFields of Document object.
Php Code
$doc = new Java("com.aspose.words.Document");
// Use the document builder to insert some content and fields.
$builder = new Java("com.aspose.words.DocumentBuilder",$doc);
// Insert a table of contents at the beginning of the document.
$builder->insertTableOfContents("\\o \"1-3\" \\h \\z \\u");
$builder->writeln();
// Insert some other fields.
$builder->write("Page: ");
$builder->insertField("PAGE");
$builder->write(" of ");
$builder->insertField("NUMPAGES");
$builder->writeln();
// Call the method below to update the TOC.
$doc->updateFields();
Download Update Fields (Aspose.Words) from any of the below mentioned social coding sites:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.