我正在使用 OO 3.0 并根据官方 openoffice 文档(http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide/StarDesktop)来替换文档,这是所需的代码:
Dim Doc As Object
Dim Dummy()
Dim Url As String
Dim SearchFlags As Long
SearchFlags = com.sun.star.frame.FrameSearchFlag.CREATE + _
com.sun.star.frame.FrameSearchFlag.ALL
Url = "file:///C:/test.odt"
Doc = StarDesktop.loadComponentFromURL(Url, "MyFrame", SearchFlags, Dummy)
MsgBox "Press OK to display the second document."
Url = "file:///C:/test2.odt"
Doc = StarDesktop.loadComponentFromURL(Url, "MyFrame", SearchFlags, Dummy)
我试过了,但它不起作用,从 VB 和 OO Basic 都试过了我错过了什么?(我使用所有标志 23+8 甚至 55 作为搜索标志掩码)