I have a form with a header in it. When I use the uidoc.gotobottom function, it goes to the last field in the header. I want it to go to the last field on the form.
How can I do this?
There is only one field below the header. If I use uidoc.gotofield(“fieldname”) then it goes to the field. However, the insertion point is the top of the field before existing content. I want the insertion point to be the bottom of the field after the existing data in the field.
Thanks Andre! And thanks for all the solutions that you have given on this forum that I have gotten a ton of use out of.
I tried that already. It didn’t work.
Here is what I am trying to accomplish:
I have a form that is almost exactly the memo form in the mail database.
I have HTML text that I want to put in the Body field (like an email signature). The only way I know how to do this is by using the Import method of the NotesUIDocument.
I want the form to default to the SendTo field.
I want the cursor to be at the top of the body field when the user tabs down to it.
The problem is that after the Import happens the cursor location is after where the imported text is. I can get the cursor to go to the top of the field by using a Windows API to send + HOME. That works fine as long as “Give Field Initial (Default) Focus” property of the SendTo field is not checked. But I want that property checked. The +HOME happens in the SendTo field. (due to the order of execution I assume).
A solution that I am thinking of right now is to do this:
remove the check mark from the “Give Field Initial (Default) Focus” property of the SendTo field
import the html text
use the Windows API to go to the top of the body field.
use uidoc.GotoField(“SendTo”) to “default” the form to the SendTo field.
Is there a better way? Or is that what I should do?