Bug 107960

Summary: Writer and Calc drop BASIC modules if resave as MS formats documents
Product: LibreOffice Reporter: dimahetman <post.box>
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: andreas.heinisch, himajin100000, oliver.brinzing, siti
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=148806
https://bugs.documentfoundation.org/show_bug.cgi?id=144204
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: test file

Description dimahetman 2017-05-19 18:10:03 UTC
Created attachment 133407 [details]
test file

1. I created a simple ODS file with this script 

Sub Main
The dim test
Test = "Test test"
End Sub "

2.stored it
3. Opened it
4. checked if the script exists
5. Saves in XLS or XLSX format
6. close all
7. opened the XLS file and the script in the file disappeared!
Comment 1 Oliver Brinzing 2017-05-21 13:48:51 UTC
confirming, the macro module disppeared.
Comment 2 QA Administrators 2018-05-28 02:31:40 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2020-05-28 03:42:34 UTC Comment hidden (obsolete)
Comment 4 Timur 2022-04-27 08:23:58 UTC
*** Bug 148806 has been marked as a duplicate of this bug. ***
Comment 5 Mike Kaganski 2022-04-27 08:38:46 UTC
This is not a bug.

When you created a Basic module in LibreOffice, it was a new StarBasic module. There is no StarBasic support in MS formats - just the same way as any other module type except VBA (AFAIK).

LibreOffice can not *create* VBA modules; it only can import them and then work with them to some degree. To allow saving modules created in LibreOffice, we should implement a new feature "create a VBA module". So this could be changed to such an enhancement request possibly.
Comment 6 Justin L 2022-10-01 02:19:15 UTC

*** This bug has been marked as a duplicate of bug 139938 ***