Problem solve Get help with specific problems with your technologies, process and projects.

Stop child docs from displaying print setup window

How can I stop my child documents from displaying the print setup window every time it runs through its loop? Please see script:
 Dim workspace As New NotesUIWorkspace          
     Dim session As New NotesSession
     Dim db As NotesDatabase
     Dim uidoc As NotesUIDocument
     Dim item As NotesItem
     Set db = session.CurrentDatabase
     Set uidoc = workspace.CurrentDocument
     Set doc = uidoc.Document
     If uidoc.EditMode Then Call doc.Save
( True, True) 'was uidoc.Save
     'switch to view with "Requistion Print" form
     doc.SaveOptions = 0
     doc.Form = "FORM"
     Set uidoc = workspace.EditDocument
(True, doc, False)
     Set doc = uidoc.Document
     Call uidoc.Print
     'restore to normal
     Call uidoc.Close
     'save minor changes
     Set uidoc = workspace.EditDocument
(True, doc, False)
     Set doc = uidoc.Document
     doc.SaveOptions = 1
     Set item = doc.ReplaceItemValue
( "reqR_Printed", "Yes" )
     doc.Form = "Requisition"
     Call uidoc.Refresh
     Call doc.Save( True, True)
     Call uidoc.Close
     'print the child documents
     Dim parentdoc As NotesDocument
     Dim childdoc As NotesDocument
     Dim responses 
As NotesDocumentCollection
     Set parentdoc = 
     Set responses = parentdoc.Responses
     For i = 1 To responses.Count    
 'loop thru the links
          Set childdoc = 
          Set uidoc = 
workspace.EditDocument( False, childdoc )
          Call uidoc.Print
          Call uidoc.Close     
End Sub
The Uidoc.Print method invokes the dialog if there are no parameters in the call. All you need to do is populate the parameters in the call.
Call notesUIDocument.Print( [ 
numCopies%, [, fromPage%, [, 
toPage%, [,draft ]]]] )

See the Developer help file for more details.

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Lotus Notes Domino Application Development

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...