Examples: GetSelectedText method
- This form action appends all currently selected text in a document
to a file.
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
- This form action reduces the value of a field to the currently
selected text within the field.
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
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.