Again, this could be a timing issue - VBA being too fast for the Lotus Notes UI. Try adding a wait of 1 or more seconds before the GetDocument and/or EditDocument, like this:
In the above code, EditDocument is being called as a function so that GoToField can be invoked to place the cursor in one of the email fields.
I can't think of anything else which could cause the error (never happened on my system). If the wait doesn't fix it, you'll have to do some basic debugging - set breakpoints, step through the code, examine variables (e.g. verify that NUIDocument is not Nothing).
Bookmarks