I have to create and save a document, a report, every day after 5 pm.The document is “IT Overview Report”.I am trying to do this by a scheduled agent.The code I am writing is :
Sub Click(Source As Button)
Dim w As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc1 As NotesDocument
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set doc1 = db.CreateDocument
Set doc = Call w.ComposeDocument( "", "", "IT Overview Report" )
Call uidoc.Save
unid = doc.UniversalID
doc.SaveOptions = "0"
Call doc.Save(False, True)
Call uidoc.close
End Sub
I have got the error on
Set doc = Call w.ComposeDocument( "", "", "IT Overview Report" )
Why it is so?what mistake i am doing?
Thanks.