How do I add VBA reference to a VBA script?

I want to use Shell32 as part of my macros, but getting “Unknown Data Type” error

I read that I need to add “microsoft shell controls and automation” reference to the module. Now, in Excel you merely have to click Tools → Add reference.

For the life of me, I spent 15 minutes and I can’t find ANYTHING similar in LibreOffice.


Welcome, and I’m really impressed by your invested time…
Usually there is not much demand to use specific Windows-Code in a portable Programm, wich runs also on Linux or MacOS, but it was possible to interface to dlls, but Extensions for Excel will usually not work in LibreOffice.

However: Keep an eye on the topic 32 and 64-bit. It may be easier to attempt this from 32-bit LibreOffice…