Ask Your Question

Writer: Move an image using LibreOffice Basic Macro

asked 2017-11-08 12:35:16 +0100

panico gravatar image

updated 2017-11-08 12:44:39 +0100

Hello, I want to move an image using LibreOffice Basic Macro. Can you help me please? I have this code so far.

   dim oDoc as object
   dim oGraphics as object    
   oDoc = ThisComponent
   oGraphics = oDoc.getGraphicObjects()

   Dim oImg as Object    
   For Each oImg in oGraphics
     if oImg.Name = "Movable" then
        rem move the image changing X and Y position
     end if

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-11-08 14:10:47 +0100

librebel gravatar image

Hello @panico,

please try if this works:

rem move the image changing X and Y position
oImg.HoriOrientPosition = 9000  REM specified in mm/100 , relative to HoriOrientRelation
oImg.VertOrientPosition = 3000
edit flag offensive delete link more


It works!!!! Thanks a lot, librebel !!

panico gravatar imagepanico ( 2017-11-09 08:13:57 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-11-08 12:35:16 +0100

Seen: 125 times

Last updated: Nov 08 '17