[Solved] Insert Image, Position and Resize via Macro in Calc
Posted: Wed Jan 27, 2016 1:17 am
We need to extract certain info create a new spreadsheet format, insert an image and save as pdf
but we can haven“t found how to resize and position the image
we insert it with:
and then how do we place it and position: x=0.53cm and y=0.41cm and size: width=15.59cm and heigh=2.83 cm
Any One?
Thanks
but we can haven“t found how to resize and position the image
we insert it with:
Code: Select all
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "FileName"
args1(0).Value = "logosLMF.png"
args1(1).Name = "FilterName"
args1(1).Value = "PNG - Portable Network Graphic"
args1(2).Name = "AsLink"
args1(2).Value = false
dispatcher.executeDispatch(document, ".uno:InsertGraphic", "", 0, args1())
Any One?
Thanks