I have a Word 2003 document that contains nested field codes that look like this:
{ INCLUDEPICTURE "\\\\aserver.xyz.com\\Signature\\{ DOCVARIABLE SIGNER_IMAGE }.jpg" \* MERGEFORMAT }
In the simplest case if I open a document that contains these field codes and save it right away, the saved copy does not properly retain the field codes. They end up getting converted into something that looks like this:
{ INCLUDEPICTURE "\\\\aserver.xyz.com\\Signature\\ DOCVARIABLE SIGNER_IMAGE .jpg" \* MERGEFORMAT \d }, with one non-printable character before DOCVARIABLE and two before the .jpg.
I have attached a copy of the Word doc with the original field codes. Below is a snippet of the code that was used to do the save:
Dim oLic As New License
oLic.SetLicense("Aspose.Words.lic")
Dim oDoc As New Document("C:\test\NestedFieldCodes\NestedFieldCodes3.doc")
oDoc.Save("C:\test\NestedFieldCodes\NestedFieldCodes4.doc")