This code keeps says "Document command is not available" at uiDoc.editmode=false

Set nws=New notesUIWorkspaceSet uiDoc=nws.currentDocument

editMode=uiDoc.editMode

If(editMode) Then

Call uiDoc.Save

uiDoc.editMode=False

End If

  • I’ve seen the posts about editmode here in the forum, and they indicate the code above should be correct. Yet when I click the Form Action button containing this code, it gives the indicated error.

  • To make matters worse, it does this IMMEDIATELY. There is a bit of code between when the button is clicked and the above snippet. That “bit of code” begins with a Stop statement, and the debugger is active. Yet it pops the error dialog pointing to the uiDoc.editmode=false line without entering the debugger. Dozens of lines of code appear to be run in the background, then the dialog appears, just as if the debugger is not in fact enabled. Yet File->Tools clearly shows a check mark there, and it actually loaded the debugger only moments before.

  • Any ideas on what’s going on here? Thanks for your time…

Subject: This code keeps says “Document command is not available” at uiDoc.editmode=false…

http://www-1.ibm.com/support/docview.wss?rs=475&context=SSKTWP&context=SSKTMJ&q1=1094450&uid=swg21094450&loc=en_US&cs=utf-8&lang=en

Subject: RE: This code keeps says “Document command is not available” at uiDoc.editmode=false…

  • Just found this myself. Thanks for the link!..