(HELP) uidoc.Refresh(True)

Hi all, I have to run an agent to fix contents of fields , and only it is working with uidoc.Refresh(True). How can I use uidoc.Refresh(True) within agent that runs selected document in view?

Dim workspace As New NotesUIWorkspace

Set uidoc = workspace.Currentdocument	



Call uidoc.Refresh(True)

Call uidoc.Save

Thank you very much,

Subject: (HELP) uidoc.Refresh(True)

Notesuiworkspace has a method to open a document and returns UIDOC object.

Based on what I see you could probably achieve the same thing using ComputewithForm method of the Document class.

Use the unprocessedDocuments property of the db to get documents selected in view and process each document.

See the help it has all the example code you need.

Subject: (HELP) uidoc.Refresh(True)

If you are running an agent on documents in a view, then you dont have a uidoc object. You need to use the notesdocument object.

Look into the computewithform method of notesdocument class.

Good luck.

  • Matt