View member feedback to this tip.
This code snippet demonstrates using the Windows API to perform Edit->Select All and Edit->Deselect All actions from the Notes edit menu. You can change the arguments being passed to the subroutine keybd_event to simulate other keyboard actions.
Code
Place in declarations:
Place in shared action or wherever desired:
For example, the following snippet of
code would invoke the open database dialog:
Users must be careful, however; if the last line of code, to lift up the Alt key, is not included, the keyboard will continue to function as if the Alt key is being held down.
MEMBER FEEDBACK TO THIS TIP
This method doesn't work with different Notes client languages. The sequence of keys is different.
-- Anonymous
*******************************
Great workaround for SendKeys(). I just want to know, if Andrew Young can do this in a few lines of code why can't Lotus make SendKeys...
To continue reading for free, register below or login
To read more you must become a member of SearchDomino.com
');
// -->

() work in the Notes client? Good work, Andrew.
-- Dale F.
*******************************
The tip is good, but it's not NLS portable. The Windows key events are dependent on the NLS version of the Notes client.
-- Jesus M.
*******************************
The Select All code could be minimized a little more by bypassing the Edit menu, and using CTRL+A instead. No big difference, but a few less lines.
Unfortunately, Notes does not have a Deselect all key.
-- Anonymous
*******************************
It does not work if you open another window after "deselect all" [e.g., UIWorkspace.ComposeDocument(...)].
-- Irina E.
*******************************
I just created a Smarticon to have a deselect icon with this code:
Works great. Of course, this is done after doing a CTRL-A to select all.
-- Anonymous
Do you have comments on this tip? Let us know.