[Solved] How to create module?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
1assnik
Posts: 2
Joined: Fri Aug 23, 2024 4:55 pm

[Solved] How to create module?

Post by 1assnik »

Hello! I'm trying to create module with method addmodule() in com.sun.star.lang.XComponent in MRI but it doing nothing. :crazy: Generally, I need to do this through another program via COM-object, but I'm debugging this through the embedded programming language.
Last edited by 1assnik on Tue Aug 27, 2024 10:28 am, edited 1 time in total.
OpenOffice 4 on Windows 10
JeJe
Volunteer
Posts: 2923
Joined: Wed Mar 09, 2016 2:40 pm

Re: How to create module?

Post by JeJe »

https://www.openoffice.org/api/docs/com ... ccess.html

Its deprecated. Can't you use

Code: Select all

thiscomponent.basiclibraries.getbyname("Standard").insertbyname("newmodule","whatever")
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
1assnik
Posts: 2
Joined: Fri Aug 23, 2024 4:55 pm

Re: How to create module?

Post by 1assnik »

Yes, indeed, thank you. I used this before, but I didn't see the module in the created document and it didn't work properly. The problem is in the macro itself.
OpenOffice 4 on Windows 10
JeJe
Volunteer
Posts: 2923
Joined: Wed Mar 09, 2016 2:40 pm

Re: How to create module?

Post by JeJe »

I don't follow your reply... if the problem is still not solved... perhaps you'll need to give more information for someone to help you.

If its solved please put [Solved] in front of the thread title so people know.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply