Domino 9 und frühere Versionen > ND8: Entwicklung
Problem mit Script: Drucken markierter Dokumente (nur erste Seite)
skrueger:
Hi !
Ich habe ein Script, das alle in einer Ansicht markierten Dokumente drucken soll. Bei den Dokumenten soll dann nur die 1. Seite gedruckt werden.
Mein Problem ist: wenn ich 3 Dokumente in einer Ansicht markiere und dann drucke, wird das erste markierte Dokument 3x gedruckt.
(auch nur die 1. Seite, das ist also i.O.)
Aber warum druckt er die anderen 2 markierten Dokus nicht ? :-:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim uiview As NotesUIView
Set db = session.CurrentDatabase
Set uiview = workspace.CurrentView
Set collection = db.unProcesseddocuments
Set doc= collection.GetFirstDocument
Do Until doc Is Nothing
Call uiview.SelectDocument(doc)
Call uiview.Print(1, 1, 1 )
Set doc= collection.GetNextDocument(doc)
Loop
End Sub
botschi:
Ich glaube wegen
--- Code: ---call uiview.SelecteDocument(doc)
--- Ende Code ---
.
Versuche mal
--- Code: ---Set notesDocumentCollection = notesUIView.Documents
--- Ende Code ---
und dann uiview.print....
Matthias
skrueger:
-->> dann bekomme ich die Meldung "Varaint does not contain an Object " bei der Ausführung .
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim uiview As NotesUIView
Set db = session.CurrentDatabase
Set uiview = workspace.CurrentView
Set collection = db.unProcesseddocuments
Set doc= collection.GetFirstDocument
Do Until doc Is Nothing
Set notesDocumentCollection = notesUIView.Documents
'Call uiview.SelectDocument(doc)
Call uiview.Print(1, 1, 1 )
Set doc= collection.GetNextDocument(doc)
Loop
End Sub
botschi:
Aus
--- Code: ---Set notesDocumentCollection = notesUIView.Documents
--- Ende Code ---
mach
--- Code: ---Set Collection = notesUIView.Documents
--- Ende Code ---
Matthias
ascabg:
Hallo,
Sollte dies hier nicht auch funktionieren
--- Code: ---Call uiview.Print(1 , 1, 1, , 2, , False)
--- Ende Code ---
In Anlehnung an die Designer-Hilfe.
uiview.Print
--- Zitat ---Prints the selected document(s) or the current view.
--- Ende Zitat ---
Andreas
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln