We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Built in Field names change to mergefields when converting Doc-RTF-DOC

Hi, I use Aspose. Words to convert a Doc file to RTF for online editing. After editing, it is converted back to doc, but Fields which use the document properties such as Subject, Author and Keywords are changed to mergefields with similar names (Subject, Author and keywords) when the document is converted from RTF back to Doc. As they are now merge fields, they no longer link corrctly to the document properties.

Is there a way I can iterate through the mergefields in the converted document and change the fieldtypes back to the correct settings to link them to the appropriate document properties? Can you provide some sample C# code? Any help is appreciated.

Hi Bob,

Thanks for your request.

If I understand you correctly I can just convert your DOC to RTF and then back to DOC to reproduce the issue. Is that correct? Please attach the DOC file with the fields. I will try to reproduce the issue on my side and then provide you more information.

Regards,

Thanks for your prompt follow up, Denis. I have further researched this problem and found that it is not in the Aspose.Words document conversion process.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

After converting the original doc to RTF, the file is sometimes edited using a web Editor control (TE Edit from Subsystems Inc). If the file is not edited, the fields are converted correctly. If the document is edited and saved using the Web Editor, the fields are changed to mergefields.

Although it is not caused by Aspose, can I use Aspose.Words to change the fields back from mergefields? I have attached to documents, source.doc (good) and dest.doc (bad) which demonstrate the problem in the fields (such as the name Joseph Bloggs which should be linked to the document subject) in the first page of the document.

Alternatively, does Aspose have a recommended Web Editor that complements your products for Editing documents on an ASP.Net page?

Thanks again, Bob

Hi Bob,

There are details on how to edit and change fields on this documentation here. Using this you should be able to edit the fields back to what they were.

I couldn’t help noticing that your headers and footers were displayed incorrectly on your output document that you attached. If you are still having troubles with this, don’t forget that a work around was posted on your other thread which makes the headers and footers appear correctly.

Thanks,