Not sure about the exact requirement, but yes you can do this via my Word Exporter module. Input is a Word doc, which functions as a template. Output can be an altered document with replaced words, tables and even Excel graphs:
I am already working on adding rich text support to it as well. If you need it let me know and I will add it to the AppStore version as well
I’m using Ivo's module for generating .docx files. To view .docx files within a Mendix page, see this article:
Eventually I got it working.