Hi,
There is a bug in Aspose.Words if you run the code below:
var documentWithStyleRefDate = new Document("Document with StyleRef Date.docx");
var emptyDocumentWithDateStyle = new Document("Empty document with Date style.docx");
emptyDocumentWithDateStyle.AppendDocument(documentWithStyleRefDate, ImportFormatMode.KeepSourceFormatting);
emptyDocumentWithDateStyle.Range.Fields[0].Update();
emptyDocumentWithDateStyle.Save("Resulting document.docx");
In the resulting document, I expect to see:
{STYLEREF Date_0 * MERGEFORMAT}
But see:
{STYLEREF Date * MERGEFORMAT}
Thus, the field can not be updated correctly (see Resulting document.docx in attached archive (127.7 KB)
I use Aspose.Words 17.9.0.0
Many thanks,
Alex Shloma