Bug 145270 - LO files should have a macro module by default
Summary: LO files should have a macro module by default
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-22 08:57 UTC by Frederic Parrenin
Modified: 2024-01-22 14:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Parrenin 2021-10-22 08:57:08 UTC
I give basic programming lessons to 1st year students at univ using macros in LO.
I have remarked a common problem that students have.
When you open a new file, this file has no macro module by default.
So you need for example to go in the macro view, click on "Modules", then select your file, then click "New", then give a name and accept.
This is not completely straightforward, and I think LO could do as Microsoft Office and create a module by default.
This would remove a entry barrier when working with macros.
Comment 1 Jean-Baptiste Faure 2021-10-22 13:25:46 UTC
I do not understand your request: when I use menu Tools > Macros > Edit Macros...
in an empty new file, I get Module 1 and an empty macros skeleton.

Please could you explain clearly what is missing?

Status has been set to NEEDINFO, please set it back to UNCONFIRMED once requested information has been provided.

Best regards. JBF
Comment 2 Frederic Parrenin 2021-10-22 16:07:48 UTC
> I do not understand your request: when I use menu Tools > Macros > Edit Macros... in an empty new file, I get Module 1 and an empty macros skeleton.

I do not get the same.
I suspect you are confused with a module named "Module1" which is in "My macros and dialog boxes" (which the general LO macro library), but not in the file you just opened.
Comment 3 Regina Henschel 2021-10-23 00:40:51 UTC
I think, having always a macro module would be no good idea, because files, which have a macro module will produce a security warning when opening the file, even if the module is empty.
Comment 4 Frederic Parrenin 2021-10-23 16:18:30 UTC
> I think, having always a macro module would be no good idea, because files, which have a macro module will produce a security warning when opening the file, even if the module is empty.

In this case, we can produce a warning only when the module is not empty. I think this is what MS Office does.

The other possibility would be to make it easier to create a new module from the module tree view. For example, right clicking "Standard" and then "Create new module".
Comment 5 QA Administrators 2021-10-24 03:44:49 UTC Comment hidden (obsolete)
Comment 6 Rafael Lima 2022-12-12 21:00:23 UTC Comment hidden (obsolete)
Comment 7 Rafael Lima 2022-12-12 21:02:06 UTC
Sorry for the noise... I accidentally modified the wrong bug report.
Comment 8 Rafael Lima 2024-01-22 14:14:57 UTC
Since LO 7.6 if you select the file in the "Current Library" dropdown list and it does not have any modules, then a default "Module1" module will be automatically created.

I'm closing this as WFM. Feel free to change it back.