LOTUSSCRIPT /COM/OLE のクラス
例:GetSelectedText メソッド
1. 次のフォームアクションは、文書で現在選択されているすべてのテキストをファイルに追加します。
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
texxt$ = uidoc.GetSelectedText()
pathname$ = "c:\Selected.txt"
fileNum% = Freefile()
Open pathname$ For Append As fileNum%
Print #fileNum%, texxt$
Close #fileNum%
End Sub
2. 次のフォームアクションは、フィールドの値をフィールド内で現在選択されているテキストに減らします。
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim text As String
Dim fieldName As String
fieldName = "Subject"
Set uidoc = workspace.CurrentDocument
text = uidoc.GetSelectedText(fieldName)
If text <> "" Then
If Not uidoc.EditMode Then uidoc.EditMode = True
Call uidoc.FieldSetText("Subject", text)
End If
End Sub
関連項目
GetSelectedText メソッド
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集