AnsweredAssumed Answered

Create document based on word template through alfresco javascript

Question asked by mitpatoliya on Apr 1, 2014
Latest reply on Apr 9, 2014 by rjohnson
I am trying to create word document from word template which I have uploaded in to repository through alfresco javascript.
Issue is that arguments which I am passing during processTemplate is not replaced with place holders.
Script which I am using is as follow.

var fileNode=companyhome.childByNamePath("/Data Dictionary/Node Templates/template1.doc");
var doc1=space.createFile("testtemplate.doc");
var props = new Array(1);
props["docname"] = "tesstttt";
var content=document.processTemplate(fileNode,props); content;
doc1.mimetype = "application/msword";;

My word template is simple with following content.

Hello how are you ${docname}