Ask Your Question
1

Writer: Move an image using LibreOffice Basic Macro

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

panico gravatar image

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

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
   Next

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

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

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

Comments

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

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

Question Tools

1 follower

Stats

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

Seen: 50 times

Last updated: Nov 08 '17