Domino 9 und frühere Versionen > Entwicklung

Folder References bei Antwortdokumenten

<< < (2/2)

Axel:
Hi,

wird den die Variable parent sauber gesetzt? Überprüf' das doch mal mit dem Debugger.


Axel

pl001:
Ich denke es liegt wohl eher an dem "Then Goto Empty".

Peter

Axel:
Hi,

ja schon, aber Goto Empty wird nur ausgeführt wenn r leer ist.

Ändere doch mal die ForAll - Schleife ab und füge nur mal eine Messagebox ein.


          Forall r In parent.FolderReferences
              MsgBox r
          End Forall     

Axel
 

pl001:
Habe es wie folgt gelöst:


--- Code: ---Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim szReference As String
Dim szDocID As String
Dim parent As NotesDocument

Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument

While Not (doc Is Nothing)

If Not doc.IsResponse Then
Forall r In doc.FolderReferences
If r = "" Then Goto Empty
szReference = r & Chr(10) & szReference
End Forall
End If

If doc.IsResponse Then
szDocId = doc.ParentDocumentUNID
Set parent = db.GetDocumentByUNID(szDocID )
Forall r In parent.FolderReferences
If r = "" Then Goto Empty
szReference = r & Chr(10) & szReference
End Forall     
End If
Msgbox "Folder References: " & Chr(10) & Chr(10) &szReference, 64, db.title
Set doc = collection.GetNextDocument(doc)  'Nächstes Dokument
Wend

Exit Sub

Empty:
Msgbox "No References in this document....", 64, db.title

End Sub
--- Ende Code ---

Gruß
Peter

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln