2006-06-05 10:15 [LotusScript] 選擇並開啟視界
將文章移動2006/06/05
안녕하세요? [annyeonghaseyo] 你好!最近熱衷學韓文:p,所以用韓語打招呼!第一次在blog post程式語法,請多多指教喲!
首先我們來看看程式的結果會怎麼呈現:

按鈕按下後,會將資料庫裡擁有視界名稱抓出來,秀在視窗中供使用者選擇;當使用者選好按下〔確定〕鍵後,會開啟所選的視界。

原始碼如下:
Sub Click(Source As Button)
On Error Goto Acupressure //如果發生Error就跳到 Acupressure區段裡
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim uidoc As NotesUIDocument
Dim colDoc As NotesDocument
Dim colViews() As String
Dim doc As NotesDocument
Dim uidb As NotesUIDatabase
Dim db As NotesDatabase
Dim thisView As String
Dim i As Integer
i = 0
Set db = s.CurrentDatabase
Set uidb = ws.CurrentDatabase
Forall v In db.Views //將資料庫的視名稱放入colViews字串陣列中
temp = Cstr(v.name)
Redim Preserve colViews(i + 1)
colViews(i) = v.name
i = i + 1
End Forall
thisView = ws.Prompt(PROMPT_OKCANCELLIST, "系統資訊", "請選擇視界", colViews(0), colViews)
Call uidb.OpenView(thisView) //開啟指定的視界
Acupressure: //Acupressure區段
Resume Next
End Sub
감사합니다.〔kam sa ham ni ta〕謝謝!
我要評分:


