Hi!
I am trying to create a report that exports a diagram image to a Word. I have done it previously in Excel without problem, but when trying to do it in Word all I get is an image with a large X like this:
Thats my code:
var pic = oModel.Graphic(false,false,g_nLoc);
var sfileName = oModel.GUID() + ".png";
pic.setZoom(150);
pic.Save(oOutput, sfileName);
var data = Context.getFile(sfileName, Constants.LOCATION_OUTPUT);
var image = Context.createPicture(data);
outputObj.OutGraphic(image, -1, 156, 43 );
Context.deleteFile(sfileName);
I have run out of ideas, please help.
Nikita Martyanov on
Hi Antonio,
here is some code lines that can help you.
I don't understand why you need temp file, you can output graphic directly to Word.
You can zoom in and zoom out with the second parameter and set size of picture in document with two last parameters.
---
BR, Nikita