I am new to SugarCRM & WebDAV, and working on a task to manage mail merge templates.

My task is to select & open an existing mail merge template word file through a drop down on Notes page, then using a button i need to merge contact details of person selected on that page and display the merged word file to user for further editing. When user saves this file it should be saved on website folder using WebDAV and attached to Note I am creating.

I am in trouble of how to open a document on server for user to edit and save it back to server.

Any help is appreciated in advance.