Scripting Framework error with Basic script

Creating a macro - Writing a Script - Using the API

Scripting Framework error with Basic script

Postby Arun P. Pai » Wed Oct 16, 2019 5:44 am

Dear Friends,

How are you all, I am back after a long time.

Downloaded the lastest version of Apache_OpenOffice_4.1.7_Win_x86_install_en-US.

Using Window Os Windows 6.3 (Build 9600) Windows 8.1 Single Version.

I do not have MS office at home but have to open Excel or Word files received from others.
Sometimes I write small Macros to automate repeated tasks, but not all work to my expectations.
But I love the Basic in OOo though it is tough and it differs a lot from VB used in Excel.

The following Error Screen appears when I open an spread sheet file. (ods)

Open Office Error.
A Scripting Framework error occurred while running Basic script vnd.sun.star.script:Standard.GoHome.GoHome?
language=Basic&location=application.

Message: The following Basic Script could not be found:
library: 'Standard'
module: 'GoHome'
method: 'GoHome'
location: 'application'


Is this due to a Macro named GoHome residing in the Library?

How to solve this?

Please help.

Thanking you all in advance.

Have a nice day.

Arun.

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply (Hagar, Moderator).
Arun
OS - Windows 8.1
Open Office 4.1.5
Arun P. Pai
 
Posts: 15
Joined: Thu Apr 26, 2018 7:53 am

Re: Apache_OpenOffice_4.1.7_Win_x86_install_en-US

Postby RusselB » Wed Oct 16, 2019 6:32 am

I'm far from an expert on macros, but it looks to me like you have a problem with that macro or that you have a macro that is saved, but incomplete.
Have you used this macro previously? If so, what was the last version of OpenOffice that the macro worked on?
I'm not aware of any changes to the macro programming for OpenOffice 4.1.7, but I'm not going to say there weren't any.

If this macro is one that you wrote, then one of the other helpers that's more familiar with macros might be willing to look it over.
Uploading/attaching a copy of your macro would be helpful for any that do want to look at it to see if they can spot any problems.

If you go to Tools -> Macros -> Organize, you'll see a small list of the macro languages that OpenOffice works with. If you can find the macro in one of those lists, then you should be able to disable it until such time as the problem with the macro can be resolved.
OpenOffice 4.1.7 and LibreOffice 6.3.3.2 on Windows 7 Pro & Ultimate
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
RusselB
Moderator
 
Posts: 5685
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Scripting Framework error with Basic script

Postby JeJe » Wed Oct 16, 2019 11:49 am

Go to Tools menu/macros/organise macros/Openoffice basic
In the dialog that pops up go to MyMacros in the left hand listbox Standard library.

That is where your spreadsheet is expecting a macro called Gohome to be in a module called goHome.

You can stop the error by putting one there - it can be an empty one that does nothing - create a module called GoHome and put this there.

Sub GoHome
End sub

Or find the original sub and put it there.

Alternatively you can look for the place that calls the macro. Go to Tools/customise/events and see if that macro is assigned to the Open document event. As its a spreadsheet macros can also be assigned to sheet events (right click on the sheet tab). If your document has macros do a search in the IDE for one that calls "GoHome". Controls like buttons in your document can also be assigned macros.
Edit: and then delete the call to the macro GoHome as its no longer available. (didn't make that clear)
Last edited by JeJe on Wed Oct 16, 2019 2:07 pm, edited 3 times in total.
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 629
Joined: Wed Mar 09, 2016 2:40 pm

Re: Scripting Framework error with Basic script

Postby John_Ha » Wed Oct 16, 2019 1:48 pm

AOO cannot find your macro.

See [Tutorial] How to record a macro (and Regular Expressions) for where macros are located. Don't forget macros can be saved to the PC for use in any document; or saved to a document for use in that document only.

Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6951
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Scripting Framework error with Basic script

Postby Arun P. Pai » Thu Oct 17, 2019 3:48 am

Dear Friends,

Thank you very much.

Sorry the caption in the Subject should have specifically mentioned the problem. Next time will do it right.

Dear John - Problem is not solved need some time to check it out.

Dear RusselB

Have you used this macro previously?
If you go to Tools -> Macros -> Organize, you'll see a small list of the macro languages that OpenOffice works with.


Did a check did not find any such Macro. In any case deleted all Macros.

Dear Jele
You can stop the error by putting one there - it can be an empty one that does nothing - create a module called GoHome and put this there.


Did a check and deleted all Macros.

As its a spreadsheet macros can also be assigned to sheet events (right click on the sheet tab). If your document has macros do a search in the IDE for one that calls "GoHome".


Did not find such Macro assigned to sheet events.

This Scripting Framework error occurs only when I open an existing spread sheet file.
It does not occur when opening a new spread sheet file.

Yes I did write a Macro called "GoHome". The Macro will place the cursor in cell "a1" is all sheets. But that was long ago and it did not work as expected.

Today is a working day will check out again on Sunday.

Thanks a lot friends, have a nice day.

Arun.
Arun
OS - Windows 8.1
Open Office 4.1.5
Arun P. Pai
 
Posts: 15
Joined: Thu Apr 26, 2018 7:53 am

Re: Scripting Framework error with Basic script

Postby Zizi64 » Thu Oct 17, 2019 6:40 am

Did not find such Macro assigned to sheet events.

This Scripting Framework error occurs only when I open an existing spread sheet file.
It does not occur when opening a new spread sheet file.

Can you upload one of the "existing spreadsheets" here?
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.3; AOO4.1.6
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
Zizi64
Volunteer
 
Posts: 8543
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Scripting Framework error with Basic script

Postby JeJe » Thu Oct 17, 2019 11:16 am

"Did a check did not find any such Macro. In any case deleted all Macros."

You don't need to delete any macros. The error is telling you it can't find that macro. You can put the macro back - or a dummy version as I suggested - and it will still look for it but there won't be an error because it will find the macro.

It looks like somewhere in your existing document, or possibly the document load event, or somewhere anyway, it calls that macro - but it doesn't exist so there's an error as it can't find it.
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 629
Joined: Wed Mar 09, 2016 2:40 pm

Re: Scripting Framework error with Basic script

Postby Villeroy » Thu Oct 17, 2019 12:24 pm

Example document with an embedded macro. Your macro (which no longer exists) was not embedded. Your error message indicates that your macro used to be found in "My Macros".
Either you find the calling event or you provide some dummy replacement.
Attachments
HelloWorld_onOpen.odt
(57.74 KiB) Downloaded 9 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27382
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Scripting Framework error with Basic script

Postby JulianR » Thu Oct 17, 2019 3:15 pm

The error you have shown means you have a non-existent macro assigned to one of starting events of the application. Go to Tools-Customize, switch to events tab, if you see nothing, then at the bottom you will find drop-down list titled save in. Switch to Openoffice.
At one of the entries you will see something like Standard.GoHome.GoHome. Remove that and it should go away.
Apache OpenOffice 4.1.1 / LibreOffice 5.3 / LibreOffice 6.0 / LibreOffice 6.2 on Windows 7
JulianR
 
Posts: 25
Joined: Mon Mar 12, 2018 9:41 am


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 8 guests