2013-05-04 64 views

回答

0

首先:https://wiki.openoffice.org/wiki/Extensions_development_basic是一個很好的起點。特別是XRAY工具非常有用。

下面的代碼顯示了搜索例如:

Dim oDoc As Object 
Dim oSheet As Object 
Dim oSearchDescriptor As Object 
Dim i As Integer 

oDoc = ThisComponent 
oSheet = oDoc.Sheets(0) 

oSearchDescriptor = oSheet.createSearchDescriptor() 
oSearchDescriptor.SearchString = "is" 
For i = 0 to oDoc.Sheets.Count - 1 
    oSheet = oDoc.Sheets(i) 
    oResults = oSheet.findAll(oSearchDescriptor) 
    'xray oResults 
    if not isnull(oResults) then msgbox oResults.AbsoluteName 
Next i 

如果您已經安裝XRAY,你可以檢查它的每一個對象,你可以訪問相關的API文檔。

問候

阿克塞爾

+0

感謝回答阿克塞爾。我確實使用XRAY - 但有很多方法和屬性,以至於很難找到特定的方法和屬性。此外,由於類繼承,文檔非常細化,並沒有顯示特定類的所有可能的方法。無論如何,我會盡快嘗試你的解決方案。 – Josir 2014-08-11 15:52:18

相關問題