Hi Harjo,
Tnx for the reply. I have tried 2 things but only got errors.
1 .
I have tried the writeFile method
writeFile('report.docx', plugins.it2be-word.documentobject)
I got the following error.
Can't find method com.servoy.extensions.plugins.file.WebFileProvider.js_writeFile(string,com.it2be.word.IWDocument,string).
2.
When I let the it2be plugin save the document first to
var _savelocation = '../application_server/w_docs/report.docx';
_document.save( _savelocation);
Then I added a download button with the following code:
var _pathto = "../application_server/w_docs/";
var _repname = 'report.docx';
var _reportfilename = _pathto + _repname;
var _f = plugins.file.convertToJSFile(_reportfilename)
if(_f && _f.canRead()){
plugins.file.writeFile('report.docx', _f , 'application/vnd.openxmlformats-officedocument.wordprocessingml.document')
} else {
application.output('cant read file')
}
Error: Can't find method com.servoy.extensions.plugins.file.WebFileProvider.js_writeFile(string,com.servoy.extensions.plugins.file.JSFile,string)
Think I am missing something here, or just having a bad day