1

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.

4

2 回答 2

3

这是我用于 MS Office 常量的:Microsoft Constants Database。最近为 Word 和 Excel 添加了一个脚本库。

于 2010-02-08T09:10:05.380 回答
2

您可以通过创建“TLI.TLIApplication”对象(在 tlbinf32.dll 中定义)类型的 OLE 对象,然后在该对象中查询所有 office VBA 常量,让您的代码查找这些 MS 常量。这里有一篇 MSDN 文章一般描述了这种技术:http: //msdn.microsoft.com/en-us/magazine/bb985086.aspx

在 LotusScript 环境中也有关于此过程的示例代码:http: //noteslog.com/post/ole-constants/

请注意,这是一种仅限运行时的技术。此检查方法将使您的代码可以使用所有常量,但不会通过 Domino 脚本编辑器中的 Intellisense 使这些常量可用。

于 2010-02-08T00:49:47.853 回答