How to move cursor to the end of a field (not begining)?

Posted on 2011-02-17
Last Modified: 2013-12-18
Here is a piece of my lotus script code when a button is pressed:
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument

uidoc.EditMode = True
Call uidoc.GoToField( "fieldName")

Open in new window

It puts the cursor in the field that will be edited. The problem is that the cursor goes to the begining of the field. When the field is quite long, it takes time to scroll down to the end of the field when some one is trying to add some text to the field. Is there a way to change the code and make the cursor go to the end of the fiield?
Question by:dominoPgr
LVL 22

Accepted Solution

mbonaci earned 500 total points
ID: 34922071
How about using @Formula?

If it's not the last field on your form, first position the cursor in the field to the right/bellow of your field and then use EditLeft to simulate pressing left arrow key on a keyboard:
@Command( [EditGotoField] ; "TheNextFieldName" )
@Command( [EditLeft] ; count )

Open in new window

If it's the last field on your form (the same as pressing Ctrl+End):
@Command( [EditBottom] )

Open in new window

You can try to do the same with LotusScript using:
    Call notesUIDocument.GotoBottom
    Call notesUIDocument.GotoField("fieldName")
    Call notesUIDocument.GotoPrevField
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34924690
If that doesn't work, or you don't want to rely on the visibility of other fields, try this one:

Call uidoc.GoToField( "fieldName")

I might have the syntax wrong, so please check.

Author Closing Comment

ID: 34928043
Using formula command EditLeft worked. Thank you!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lotus notes "Estimate" form to Quickbooks invoice 2 361
Invoke VBA from lotusscript after mailmerge 11 242
lotus notes, exchange 7 111
Cannot access mail archive from IBM domino 5 108
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question