Collabora Office 23.05 帮助
To manage personal or shared library containers (Application Macros or My Macros) from within a document, use the GlobalScope specifier.
Basic source code and dialogs are organized in library containers. Libraries can contain modules and dialogs.
Basic libraries and modules can be managed with the BasicLibraries object. Libraries can be searched, explored and loaded on request. Monitoring Documents Events illustrates Collabora Office library loading.
Dialog libraries and dialogs can be managed with the DialogLibraries object. Opening a Dialog With Basic illustrates how to display Collabora Office shared dialogs.
BasicLibraries and DialogLibraries containers exist at application level and within every document. Document's library containers do not need the GlobalScope specifier to be managed. If you want to call a global library container (located in Application Macros or My Macros) from within a document, you must use the GlobalScope specifier.
GlobalScope specifier
文档 Basic 中的示例
' 调用文档库 Standard 中的 Dialog1
oDlgDesc = DialogLibraries.Standard.Dialog1
' 调用应用程序库 Library1 中的 Dialog2
oDlgDesc = GlobalScope.DialogLibraries.Library1.Dialog2