Hi Bill,
As InfoPath is completely data driven you do not have programmatic access
to the controls on your View. As such, there is not, as an example, an
"OnFocus" event that will fire as you select a control.
Now with that said, there is a way to select text in specific controls so
if you wanted to allow your users to, say, click a button and set focus to
your Rich Text box, this could be done. (Another option may be where a user
makes a selection from a drop-down list box and then your code would move
the focus to the Rich Text box.)
Here is sample VBScript code that will set focus to a Rich Text control on
my form named field1:
Dim objRichTextBox
Set objRichTextBox =
XDocument.DOM.selectSingleNode("//my:myFields/my:field1")
XDocument.View.SelectText objRichTextBox
I hope this helps!
Best Regards,
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.