Bug 155360

Summary: Workbook.PrintOut 423. property or method not found
Product: LibreOffice Reporter: johnks <testing1237a-c>
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal    
Priority: medium    
Version: 7.5.3.2 release   
Hardware: All   
OS: All   
Whiteboard: QA:needsComment
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 144453    
Attachments: 423 for printout

Description johnks 2023-05-16 17:23:42 UTC
Description:
https://learn.microsoft.com/en-us/office/vba/api/Excel.Workbook.PrintOut


 ThisWorkbook.PrintOut , Preview:=True

this is the problematic code. Screenshot attached.

https://www.teachexcel.com/free-excel-macros/m-64,Complete-Guide-to-Printing-in-Excel-Macros-PrintOut-Method-in-Excel.html

try to run this example macro in libreoffice

Steps to Reproduce:
1. try to run macro with printout 
2.
3.

Actual Results:
423 error

Expected Results:
macro should work as it works in excel


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Flatpak
Calc: threaded
Comment 1 johnks 2023-05-16 17:24:08 UTC
Created attachment 187336 [details]
423 for printout
Comment 2 johnks 2023-06-05 05:14:20 UTC
https://www.exceldemy.com/excel-vba-print-preview/

i downloaded this file

https://www.exceldemy.com/wp-content/uploads/2022/02/VBA-Print-Preview.xlsm


found out the following


ActiveWindow.SelectedSheets.PrintPreview
 (this works in calc)


Worksheets("Specific Sheet").PrintPreview
(method or property not found)

ActiveSheet.PrintPreview
(method or property not found)



this is quite a good example of what works and what does not work in calc with regards to the formulae

---

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Flatpak
Calc: threaded