Hello Aspose,
I’ve converted input.docx into an RTF file using the following code snippets:
var source = "..\\..\\input.docx";
var document = new Document(source);
if (document.HasRevisions)
{
document.AcceptAllRevisions();
}
document.UpdateFields();
document.Save("output.rtf", SaveFormat.Rtf);
Console.WriteLine("Saved");
Some fields in the saved RTF file don’t have the most recent calculated result, \fldrslt does not have any value.
{\field{*\fldinst{\rtlch\af1\alang1025\afs22\ltrch\fs22\lang1033\langnp1033\langfe1033\langfenp1033\loch\af0\dbch\af0\hich\f0 LISTNUM }}{\fldrslt}}
{\field{*\fldinst{\rtlch\af1\alang1025\afs22\ltrch\fs22\lang1033\langnp1033\langfe1033\langfenp1033\loch\af0\dbch\af0\hich\f0 AUTONUMLGL }}{\fldrslt}}
{\field{*\fldinst{\rtlch\af1\alang1025\afs22\ltrch\fs22\lang1033\langnp1033\langfe1033\langfenp1033\loch\af0\dbch\af0\hich\f0 AUTONUM }}{\fldrslt}}
There is how WordPad shows these fields:
image.png (4.9 KB)
Preformatted textAccording to Rich Text Format (RTF) Specification, Version 1.9.1, fields, the \fldrslt control word should be included even if a result was not calculated because most readers (even those readers that do not recognize fields) can generally include the value of the \fldrslt destination in the document.
A sample app:
DOCXTORTF.zip (24.6 KB)
Many thanks,
Ievgenii Bukhinnyk.