Hello CrisSanz,
This is achievable as follows by combining a few components:
1. Use the CKEditor (for Traditional app) or CKEditor Reactive (for Reactive app) to create the HTML tags for your document.
2. Use CreateDocxFromHtml to generate the word document.
3. Use FileSystem server actions to create the docx file.
I have attached an oml for a Reactive app example. You can easily apply the logic to a Traditional app if that's what you are building.
Sample results screenshot:

Hope this solves it for you.
Regards,
AJ