Invoke a function stored in an other document

The Application Programming Interface and the OASIS Open Document Format

Invoke a function stored in an other document

Postby klkmva » Mon Sep 07, 2015 11:30 am

Hi guys,
from a public library module, i want to invoke a function stored in document. This code don't work :
Code: Select all   Expand viewCollapse view
' Sub stored in a public Library
Sub SelectX
Dim X
   ThisComponent.BasicLibraries.LoadLibrary("Standard")
   X = FunctionStoredInCurrentDoc()
End Sub

I don't find help on forums

Thank you
klkmva
LibreOffice 5.4.6.2
Windows 7
klkmva
 
Posts: 2
Joined: Wed Mar 25, 2015 3:30 pm

Re: Invoke a function stored in an other document

Postby Zizi64 » Mon Sep 07, 2015 1:04 pm

If I know it exactly, it is not possible to call a function from an another document.

Functions are available from two places:
1.: from the library of the office suite ('myMacros - Standard Sibrary'),
2.: and from the Standard Library of the current document.

The Standard libraries will be loaded automatically into the memory when the application is launched or the document is loaded, other Libraries you must load by program code.
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.5; 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: 8142
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Invoke a function stored in an other document

Postby hanya » Tue Sep 08, 2015 6:42 pm

Use the script provider to do it from the document instance that opened contains macros you want to invoke.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
hanya
Volunteer
 
Posts: 884
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Invoke a function stored in an other document

Postby Villeroy » Tue Sep 08, 2015 10:17 pm

Or start organizing your macros.
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: 26975
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 1 guest