/media/bill/PROJECTS/System_maintenance/LibreOffice/remove pictures,icons from Calc.txt www.BillHowell.ca 30Apr2018 initial ********************************* 30Apr2018 remove pictures,icons from Calc search "LibreCalc and remove icons from sheet" search "LibreCalc and remove pictures from sheet" +-----+ https://stackoverflow.com/questions/46048667/how-to-delete-all-images-from-all-sheets-of-a-libreoffice-calc-workbook For spreadsheets, you need to obtain the XDrawPage for each sheet. Here is proper LibreOffice Basic code. In LibreOffice parlance, it's called a spreadsheet or a document, not a workbook. Also For Each is borrowed from VBA and does not work for XDrawPage. (Sheets could be enumerated with For Each, but to be consistent, the standard For loop is preferred.) Sub DeleteAllPics() Dim oDoc As Object Dim oDrawPage As Object Dim oShape As Object Dim iShape As Integer Dim iSheet As Integer oDoc = ThisComponent For iSheet = 0 To oDoc.getSheets().getCount() - 1 oDrawPage = oDoc.getSheets().getByIndex(iSheet).getDrawPage() For iShape = oDrawPage.getCount() - 1 To 0 Step -1 oShape = oDrawPage.getByIndex(i) oDrawPage.remove(oShape) Next iShape Next iSheet End Sub answered Sep 5 '17 at 17:31 Jim K >> I created the macro in directory : /home/bill/.config/libreoffice/4/user/basic/Howell_LibreCalc_remove_pics_macLib >> Actually, an old macro Howell_Libre[Calc,Write]_remove_images_macLib did the job!! **************** 30Jun2016 Icons in spreadsheet I found out how to get rid of this before - but can't find my notes # enddoc