Calling java method in to OOobasic macro

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
maram.j.a
Posts: 6
Joined: Thu Oct 29, 2020 8:19 am

Calling java method in to OOobasic macro

Post by maram.j.a »

Hello
I am using OOobasic macro for the first time
And I need to call a method from my java extension to be executed through the macro
If you can point to me where to to finde more OOobasic tutorial and examples please

Thanks for help
OOo 4.1
win64
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Calling java method in to OOobasic macro

Post by Villeroy »

obj = createUnoService("your.extension.Service.Name")
obj.method(args)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
maram.j.a
Posts: 6
Joined: Thu Oct 29, 2020 8:19 am

Re: Calling java method in to OOobasic macro

Post by maram.j.a »

Object variable not set
OOo 4.1
win64
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calling java method in to OOobasic macro

Post by Zizi64 »

Please upload (or share on a free file sharing service) some sample files here. (The ODF file with the StarBasic macro code , and the .oxt extension. Rename the extension to .zip file extension for the upload, because you can not upload an .oxt extension file here.)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Calling java method in to OOobasic macro

Post by Villeroy »

Install MRI.
MyMacros>MRILib>Module1>Mri is a routine calling the inspect method of service "mytools.Mri".
The relevant lines in that routine are:

Code: Select all

  oMRI = CreateUnoService( "mytools.Mri" )
  oMRI.inspect( MriTargetObject )
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply