troubleshooting Question

Display While running a Manual Agent

Avatar of pratigan
pratiganFlag for United States of America asked on
Lotus IBM
23 Comments2 Solutions598 ViewsLast Modified:
Hello,
I have an agent that sends an email to everyone from a view that has a document still in open status over 5 days.  The script is below.  I'd like to add a display in the agnet so that when I initiate it, I can see a progress bar and total.
TY
paul

Option Public

Sub Initialize
      Dim session As notessession
      Dim doc As notesdocument
      Dim curdoc As notesdocument
      Dim db As notesdatabase
      Dim v As NotesView
      Dim rtitem As NotesRichTextItem
      Dim item As NotesItem
      
      Set session = New notessession
      Set db = session.Currentdatabase
      Set doc = New notesdocument (db)
      Set v = db.GetView( "OpenIRs5")
      
      Set curdoc = v.GetFirstDocument
      Do Until curdoc Is Nothing
            Dim tmpArr() As String
            Dim i As Integer
            
            Set item = curdoc.GetFirstItem( "assigned" )   'instead of Forall loop
            item.IsNames= True
            Call doc.CopyItem( item, "SendTo" )
            
      '      doc.sendto=curdoc.assigned
            doc.principal= "eStar Open IR Auto Notification Monitor"
            doc.Subject = "Assigned IR over 5 days old Pending Your Review."
            doc.Remark = "This notification is autogenerated.  Please do not reply to this email."
            Set rtitem = New NotesRichTextItem( doc, "Body" )
            Call rtitem.AppendText( "This is a Daily Notification Process indicating you have an open IR older than 5 days that Requires your attention. " + Chr(13) + "Please Open, Review and Update the IR." + Chr(13) + "A Final Cause and Resolution are Required. " + Chr(13) + "Thank You !" + Chr(13) + "Open IR Document Link  ->  " )
            Call rtitem.AppendDocLink( curdoc, doc.Subject( 0 ) )
            'Call doc.send(False,curdoc.assigned)
            
            Call doc.Send( False )
            
            Set curdoc = v.GetNextDocument( curdoc )
      Loop
End Sub
ASKER CERTIFIED SOLUTION
Sam654

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 23 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 23 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros