Success finally
Hi. Zizi46 and Everyone.
Thanks for all the advice given in solving my problems.
A. In this exercise, I learn
I. How to load 2 Open Office documents using a Macro from a launching document, any Calc workbook or Writer text document.
II. Using Macros stored in the [My Macros] to run both Writer macros and Calc macros in the 2 respective documents
III. Close the two loaded documents, 1 Writer Doc, and 1 Calc workbook at the end of the program.
IV. Resolved the issue of the OpenOffice crashing for unexpected problems just before the opening of the ".uno:BulletsAndNumberingDialog"
a.
Edit: The solution lies in pausing the processing by one tenth of a second (wait 100) just before the dialog is called. |
B. I also learn
I. How to declare and use global variables
II. The difference between the documents and their frames
a. I note that in each of the recorded macros they make use of local variables [document] and the subsequent frames [document = ThisComponent.CurrentController.Frame].
b. So I take advantage by declaring 2 global objects oFrame1 and oFrame2, remove all the statements [dim document] and [document = ThisComponent.CurrentController.Frame]. from all the macros and substitute the parameter [document] with oFrame1 and oFrame2 respectively.
c. In some places, I have to replace document, or ThisComponent with oDoc1 and oDoc2, respectively.
While it took a lot of my time, I enjoy the learning.