Hi,
I have to open all documents (only type memo) in a mail database and put them in edit mode and the save them. No data has to be put in, simple just an open/save (this is needed after a migration from Netscape where after mails cant be view in Webmail - this will solve it).
I have created an agent which has to run on selected documents (if I cant set the code to run on only memos!?), and added following code found on the site:
Sub Initialize
Dim Doc As NotesDocument
Dim UIDoc As NotesUIDocument
Dim WorkSpace As New NotesUIWorkSpace
WorkSpace.CurrentDocument.Document.SaveOptions = "0"
Set Doc = WorkSpace.CurrentDocument.Document
Call WorkSpace.CurrentDocument.Close(True)
Set UIDoc = WorkSpace.EditDocument(True, Doc)
Call UIDoc.Document.RemoveItem("SaveOptions")
End Sub
When executed I get an error “Object variable not set”.
Can anybody help me here, might be very simple for you but hard for me :).
Thanks.
//Kjeld