mit API-Calls.
Aus meiner Grabbelbox:
Const wAPIModule = "NNOTES" ' Windows/32
Const NOTE_ADDED_TO_FILE = 13
Declare Private Function ConvertTIMEDATEToText Lib wAPIModule Alias "ConvertTIMEDATEToText" _
( Byval zI As Long, Byval zT As Long, T As Long, Byval S As String, Byval nS As Integer, nT As Integer) As Integer
Declare Private Function NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _
( Byval P As String, hDB As Long) As Integer
Declare Private Function NSFDbClose Lib wAPIModule Alias "NSFDbClose" _
( Byval hDB As Long) As Integer
Declare Private Function NSFNoteOpen Lib wAPIModule Alias "NSFNoteOpen" _
( Byval hDB As Long, Byval NoteID As Long, Byval F As Integer, hNT As Long) As Integer
Declare Private Function NSFNoteClose Lib wAPIModule Alias "NSFNoteClose" _
( Byval hNT As Long) As Integer
Declare Private Function NSFNoteGetInfo Lib wAPIModule Alias "NSFNoteGetInfo" _
( Byval hNT As Long, Byval M As Integer, V As Any) As Integer
Declare Private Function OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" _
( Byval zP As Long, Byval S As String, Byval F As String, Byval N As String) As Integer
Function AddedToFile(doc As NotesDocument) As String
With doc.ParentDatabase
db$ = String$(1024, " ")
OSPathNetConstruct 0, .Server, .FilePath, db$
End With
Dim hDB As Long
NSFDbOpen db$, hDB
If hDB = 0 Then Exit Function
Dim hNT As Long
Dim T(1) As Long
NSFNoteOpen hDB, Clng("&H" & doc.NoteID), 0, hNT
If Not hNT = 0 Then
NSFNoteGetInfo hNT, NOTE_ADDED_TO_FILE, T(0)
NSFNoteClose hNT
s$ = Space(80)
ConvertTIMEDATEToText 0, 0, T(0), s$, 80, ns%
AddedToFile = Left$(s$, ns%)
End If
NSFDbClose hDB
End Function