COM wordApplication;
COM wordDocuments;
COM wordDocument;
COM wordRange;
;
wordApplication = new COM("word.application");
wordApplication.visible(TRUE);
wordDocuments = wordApplication.Documents();
wordDocument = wordDocuments.add();
wordDocument.saveas("c:\\YourDocument.doc");
wordDocument.activate();
wordRange = wordDocument.range(0,0);
wordRange.insertafter("Arijit Basu");
wordRange = wordDocument.range(6,19);
wordRange = wordDocument.range(11,26);
wordRange.italic(true);
wordDocument.save();
wordDocument.close();
wordApplication.quit();
COM wordDocuments;
COM wordDocument;
COM wordRange;
;
wordApplication = new COM("word.application");
wordApplication.visible(TRUE);
wordDocuments = wordApplication.Documents();
wordDocument = wordDocuments.add();
wordDocument.saveas("c:\\YourDocument.doc");
wordDocument.activate();
wordRange = wordDocument.range(0,0);
wordRange.insertafter("Arijit Basu");
wordRange = wordDocument.range(6,19);
wordRange = wordDocument.range(11,26);
wordRange.italic(true);
wordDocument.save();
wordDocument.close();
wordApplication.quit();
Resources:
https://community.dynamics.com/product/ax/f/33/p/29804/50440.aspx
http://dynamicsuser.net/forums/p/17081/79644.aspx
http://dynamicsuser.net/forums/p/17081/79644.aspx
Happy Daxing!
Aucun commentaire:
Enregistrer un commentaire