What I thought would be a simple task, is starting to drive me crazy.
I've created a simple formula action in a folder, to set a value for
the field "Supporter" on a form:
FIELD MyField := "MyValue";
And this works fine as long as the preview pane isn't open.
Unfortunately the preview pane is open 99% of the time, so I would
very much like the action to function then, as well.
But it seems next to impossible to edit a document in previewmode?
I've come up with this so far:
@Command([ShowHidePreviewPane];0);
@Command([EditDocument];1);
FIELD MyFieldr := "MyValue";
@Command([EditDocument];0);
@Command([CloseWindow]);
@Command([ShowHidePreviewPane];1);
The Preview Pane is hidden just fine, and reappears and i can see the
document-tab appearing briefly so I assume the document goes into
Edit-mode (which shouldnt be necessary since the preview pane is
hidden but I'm grasping at straws here), but the field value isn't set
:-(
Anyone have an idea of why, and a solution?
/Robert
why not use in a form action
Dim hSession As New NotesSession
Dim hWorkSpace As New NotesUIWorkspace
Dim hDoc As NotesDocument
Set hDoc=hWorkSpace.CurrentDocument.Document
hDoc.MyVal="100"
Call hDoc.Save(True,False)
This works while the doucment in in preview
Regards
Mark