EditMode: Document command is not available.

hzei used Ask the Experts™
I have a document containing a button with following functionality:
Sub Click(Source As Button)
     uidoc.EditMode = True
     Call uidoc.fieldsettext ("State","Processing")
     Call uidoc.refresh
     Call uidoc.save
     uidoc.EditMode = False
End Sub
When I hit the button in the document preview or when the document is in read mode after being opened from a view, it works find. But when the document is in read mode after being opened from my incoming mail box using a document link, the "uidoc.EditMode = False" causes the errormessage "Document command is not available". (EditMode = True works fine).
(I'm using client version 5.0.9a).
Any suggestions?
Thanx in advance,
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Why not just using a Formula command in your action button:
FIELD State:="Processing";

And that's all. Don't need to edit, neither to to save nor to reset the read mode.

In case you have to refresh your doc, just add the following:
FIELD State:="Processing";

Hope it helps..



I tried that before. But I also get an error when I try to execute the code (defined as a formula) by hitting the button in preview mode. (The document needs to be in editing mode). Besides that I'd like to add some other code as well (requiring lotus script).


Thank you Scott !

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial