Topic : Setting all screenshots in Calc sheet to anchor to cell
I am new to LibreOffice. I am used to macros in the XL environ
Wish to have the code to set all the screen shots in the Calc sheet ( and maybe for all sheets in the calc workbook)
to anchor on cell and not on page.
Thanks in advance.
( Not sure if i had posted this query in the wrong forum of CALC..but it does not seem to be listed too.. so am posting it here)
[Solved] Setting all screenshots in Calc sheet to anchor to
[Solved] Setting all screenshots in Calc sheet to anchor to
Last edited by RoryOF on Thu May 11, 2017 9:43 am, edited 3 times in total.
Reason: Added green tick [RoryOF, Moderator]
Reason: Added green tick [RoryOF, Moderator]
Libreoffice 4.0.2.2 on LINUX
Re: Setting all screenshots in Calc sheet to anchor to cell
The MS VBA for the Excel and the API functions of the AOO/LO are not compatible. You must rewrite all of your VBA macros based on the API (Application programming Interface) and one of the supportesd programming language.
Please upload an example document and some macro code here.
The LibreOffice has a littlebit higher compatibility (with the VBA codes) than the Apache OpenOffice.
Please upload an example document and some macro code here.
The LibreOffice has a littlebit higher compatibility (with the VBA codes) than the Apache OpenOffice.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Setting all screenshots in Calc sheet to anchor to cell
I am not referring to any VB macros. I do not want to convert any macros.
Just want a simple code that will loop thru all the screen shots that I have put in CALC sheet, to anchor on the cell
as else on inserting rows, the entire document gets misaligned.
Thank you
Just want a simple code that will loop thru all the screen shots that I have put in CALC sheet, to anchor on the cell
as else on inserting rows, the entire document gets misaligned.
Thank you
Libreoffice 4.0.2.2 on LINUX
Re: Setting all screenshots in Calc sheet to anchor to cell
Select all shapes on the current sheet so you can right-click the whole collection and do whatever you need.
Code: Select all
Sub selectAllShapes()
ctrl = ThisComponent.getCurrentController()
sh = ctrl.getActiveSheet()
dp = sh.getDrawPage()
sc = createUnoService("com.sun.star.drawing.SvxShapeCollection")
n = dp.getCount()
for i = 0 to n-1
sc.add(dp.getByIndex(i))
next
ctrl.select(sc)
End Sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Setting all screenshots in Calc sheet to anchor to cell
Thank you Villeroy...I shall try this and get back
Libreoffice 4.0.2.2 on LINUX
Re: Setting all screenshots in Calc sheet to anchor to cell
Thank you Villeroy.. it worked with a some additions...this post can be closed
Libreoffice 4.0.2.2 on LINUX