FindString called from a dialogbox

I have dialog that opens a TextInput form to display my formated text dispstr$. I included a seach button to the TextInput form to do the search. However its not finding any word inside the document or hilight any words.

Appreciate any help in this.

'callin statement

newdoc.DisplayText = dispstr$

flag = ws.DialogBox( “TextInput” , True, True , True , True, True , False, “Document Propery” , newdoc, )


Sub Click(Source As Button)

' Sub Click(Source As Button)

Dim workspace As New NotesUIWorkspace

Dim searchstring As String

Dim uidoc As NotesUIDocument

Set uidoc = workspace.CurrentDocument

Set uidoc = workspace.EditDocument(True)

    Call uidoc.FindString(Inputbox$(""Word or phrase to look for:"))

End Sub