How to integrate Microsoft word editor with Mendix?

0
How can we edit the uploaded word document in mendix? we have a use case where user uploads word file and admin can edit and save the file in mendix application.
asked
3 answers
1

Editing a Word document directly within a Mendix application can be a bit challenging, as Mendix does not natively support direct editing of Word documents. However, there are a few approaches you can consider to achieve this functionality:

1. Integrate Office 365 with Mendix

Integrating Office 365 can allow you to leverage Microsoft’s online editing capabilities. Here’s how you can approach this:

  • Use Microsoft Graph API: While you mentioned that you had issues with the Graph connector, the Microsoft Graph API can be used to interact with Office 365 services, including OneDrive and SharePoint. You can upload the document to OneDrive or SharePoint and then use the Office for the web (Office Online) to edit the document.

  • Embed Office for the web: You can embed the Office for the web (Word Online) in your Mendix application using an iframe. This allows users to edit the document directly in the browser. You would need to handle authentication and permissions to ensure that users can access and edit the document.

2. Use a Third-Party Document Editing Library

If you want to avoid the complexity of integrating with Office 365, you can consider using third-party libraries that allow for document editing:

  • CKEditor or TinyMCE: These are rich text editors that can be integrated into Mendix. While they do not support .docx files directly, you can convert the Word document to HTML, allow users to edit it, and then convert it back to a Word document format.

  • Aspose.Words: This is a powerful library that allows for manipulation of Word documents. You can use it in a Mendix Java action to load, edit, and save Word documents programmatically.

3. File Conversion Approach

Another approach is to convert the Word document to a format that can be easily edited in Mendix:

  • Convert to HTML or Markdown: When a user uploads a Word document, you can convert it to HTML or Markdown format. Users can then edit the content using a rich text editor in Mendix. After editing, you can convert it back to a Word document.

4. Using Mendix Document Management Modules

Mendix has some modules available in the Mendix App Store that may help with document management and editing. You can explore these modules to see if they meet your requirements.

answered
0

Hi Judson,

 

You can't edit the word document directly in Mendix. You can however dynamically populate fields using this module: 

https://marketplace.mendix.com/link/component/111539

answered
0

Multiple years ago I was on a team where we implemented Exari DocGen for this. A browser-plugin was created (high code) that would handle the client side of 'intercepting' the opening of Word and/or when the user clicks save on a Word document, the document ended up in Mendix.

Not sure if that approach still works (or perhaps is easier) with office365. 

Exari connector is gone from the marketplace, so perhaps it's no longer supported. However - it might be a avenue to research.

answered