I do not think it is possible/feasible to make a conversion from a Document into C# code that generates such document.
The reason for this is that Aspose.Words does not expose original collections of formatting attributes in the public API, but allows access to only fully calculated values.
What I mean is that in the original document you can have styles, paragraphs and runs and each element basically has a collection or formatting attributes. If you are familiar with WordML or OOXML you know rPr, pPr and so on. These collections are internally maintained by Aspose.Words but never made public directly.
Instead, Aspose.Words provides access to “fully calculated” formatting on objects.
Elements in Word documents “inherit” formatting from each other in certain (sometimes quite complicated) ways. For example, full formatting of a run of text consists of direct formatting applied to the run, run’s character style, all based on character styles of that style, then character formatting of the paragraph style of the parent paragraph and all based on paragraph styles. If the run is in a table then table styles can come into play too.
For example, if you define Bold somewhere in the styles then using Run.Font.Bold will give you true. You could not have that if you only have access to plain attribute collections.
So in Aspose.Words you have access to full calculated formatting, but you don’t have access to original attribute collections.
But in your case you actually need original attribute collections.If you use full formatting provided by Aspose.Words you will have no way of knowing where the formatting comes from. From a style or from an object itself. You will end up having to write ALL formatting attributes for EVERY element in the document. This will look quite ugly.
So my advice for today - don’t do this with Aspose.Words. We might provide access to original attribute collections in the public API in the future, but we don’t have a timeframe for this.
I would suggest you just embed your RTF templates as resources and then use Aspose.Words to load them, modify and output the way you want them.