Estoy intentando encontrar la posicion del grafico, pero en la forma que lo hago, presenta error.
Lo estoy intentando de dos formas
Código: Seleccionar todo
Sub Main
oDraw = ThisComponent.Drawpage
For i = 0 To oDraw.getCount() - 1
oObj = oDraw.getByIndex(i)
if oObj.supportsService("com.sun.star.text.TextGraphicObject") then
alto=oObj.Width
ancho=oObj.Height
PosicionX = oObj.GetPosition().X ' '<--- error
endif
Next
End Sub
Código: Seleccionar todo
Sub Main
dim image as object
dim vImage as object
Doc = ThisComponent
vImages = Doc.getGraphicObjects()
total=vImages.count
if total>0 then
For i = 0 To total - 1
image = vImages.getbyIndex(i)
alto=image.Width
ancho=image.Height
posicionX=image.getPosition.X '' <-- error
next
endif
End Sub
Agradecimientos por el apoyo.