Hello everybody,
I am trying to check programmatically if a Calc spreadsheet is already open. I’m sure there is a much easier method of doing this, but the way I have come up with is to list all the active frames, and it worked. However, it also brought me to another question below:
I have listed all the frames currently active using StarDesktop.getFrames.
Currently, in my particular case, StarDesktop.Frames(2) is equivalent to ThisComponent.CurrentController.Frame.
With respect to the StarDesktop.Frames(2) statement, how would I reach ThisComponent or ThisComponent.CurrentController? I tried using “.parent” but with no success.
Thanks in advance for all suggestions.