Description: Imported MS-Office files with macros are supported to a limited extent that is not publicly available. It would be good to distinguish the exact extent to which MS-VBA imported macros are supported. Steps to Reproduce: MS-VBA imported modules are set with a special attribute that enables MS-Office or ODF files to execute MS-VBA extra features Actual Results: Describe MS-VBA data model enablement for ODF documents Expected Results: Run either LibreOffice BASIC either MS-VBA in ODF files either both Reproducible: Always User Profile Reset: No Additional Info: Supported data model can be infered from https://git.libreoffice.org/core/+/refs/heads/master/oovbaapi/ .IDL source files.
Created attachment 194633 [details] May be save as a functioning .ODS document
Unfinished example help page: https://help.libreoffice.org/24.8/en-US/text/sbasic/shared/exportasfixedformat.html?&DbPAR=SHARED This method cannot be executed as such, its module requires a special attribute for it to work. A dedicated MS-VBA data model new help page may reference all MS-VBA special features. Original patch: https://bugs.documentfoundation.org/show_bug.cgi?id=149786 Documentation can be infered from .IDL files: https://git.libreoffice.org/core/+/refs/heads/master/oovbaapi/
I agree that this can be better documented. I for one do not know a lot about the internals of VBASupport. The list of all supported functions (that are documented) can ben found here: https://help.libreoffice.org/24.8/en-US/text/sbasic/shared/special_vba_func.html
We have: - VBA Properties: https://help.libreoffice.org/latest/lo/text/shared/optionen/01130100.html - Working with VBA Macros: https://help.libreoffice.org/latest/lo/text/sbasic/shared/vbasupport.html - Option VBASupport Statement: https://help.libreoffice.org/latest/lo/text/sbasic/shared/03103350.html - Exclusive VBA Functions and Statements (as Rafael linked already): https://help.libreoffice.org/latest/en-US/text/sbasic/shared/special_vba_func.html Reports of 423 errors are collected in bug 144453. Alain, just to clarify: your request is to have better coverage of supported VBA functions / methods / properties in our Help pages, is that correct? And your comment 2 is just one example of how our documentation is lacking? It might help - after you have reviewed the help pages I linked above - if you could list exactly what you think is still missing / still needs fixing. Thank you!
Hi Stéphane, 1. The purpose of this bug report is to better document VBA Objects - properties & methods - proposed by MSOffice VBA data model. Some VBA objects are accessible when reading MSOffice docs in LibO and can be executed or modified under certain - yet unprecised enough - conditions. 2. VBA functions currently documented are extending Lib BASIC language with utility methods that solely require 'Option VBASupport 1' preliminary statement. This statement does not allow the access to former VBA Objects. <obj>.ExportAsFixedFormat() method falls into category 1. This method requires to instantiate VBA objects to be used, hence its documentation is partial/incorrect. Using VBASupport'd functions next to libO BASIC may cause runtime hickups as per this post: https://ask.libreoffice.org/t/what-are-possible-negative-consequences-of-enabling-vba-support/101170/3 However, documenting supported VBA objects properties & methods - next to VBA functions - will precise VBA data model supported scope, thus easing MSOffice docs conversion to LibreOffice. Hoping this clarifies !
Thanks Alain! Let's set to "new" then. Clearly lacking in documentation, record of what is actually supported, and completeness of existing examples.
Valuable unit test documents can be found at https://opengrok.libreoffice.org/xref/core/sc/qa/extras/testdocuments/ in order to enrich 'VBA supported objects' planned help page
Alain Romedenne committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/e859581bf5302296634127cd7bb6576f6e3ec932 tdf#149786 tdf#161495 VBA objects & properties & methods (WiP)