How to import Microsoft Office constants (msoTrue, ppLayoutText…) into LotusScript?
-
20-09-2019 - |
Question
I am trying to programmatically make a PowerPoint presentation from the contents of a Lotus Notes document. This is relatively straight-forward using CreateObject("Powerpoint.Application")
but I fail to find a way to access the various constants that are used in VBA.
One solution is of course to hard-code the (ten or so) values into my script, but for obvious reasons I'm a bit uneasy about that solution.
Is there a way to lookup the value of for example msoTrue
or ppLayoutText
with LotusScript? For example a way to query the Powerpoint.Application
object for the values?
(In more compentet languages adding various Interop
libraries seems to do the trick, but I haven't found a way to do that in LotusScript.)
Edit I prefer a solution that will work without any extra installation of software or dlls, apart from Office.
Solution
This is what I use for MS Office constants: Microsoft Constants Database. There is a script library that has recently been added for Word and Excel.
OTHER TIPS
You can have your code lookup these MS constants by creating an OLE object of type "TLI.TLIApplication" object (defined in tlbinf32.dll), and then querying that object for all of the office VBA constants. There is an MSDN article describing this technique in general here: http://msdn.microsoft.com/en-us/magazine/bb985086.aspx
There is also sample code for exactly this procedure in a LotusScript environment here: http://noteslog.com/post/ole-constants/
Note that this is a runtime-only technique. This inspection method will make all of the constants available to your code, but will not make the constants available through Intellisense in the Domino script editor.