Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: ghost am 18.05.06 - 09:08:57



Titel: Zugriff auf Added per LotusScript?
Beitrag von: ghost am 18.05.06 - 09:08:57
Hallo,

ist es per LotusScript möglich auszulesen, wann ein Dokument in eine Datenbank eingefügt wurde? Also das Datum, das in den Dokumenteigenschaften unter Added angezeigt wird?

Viele Grüße
ghost


Titel: Re: Zugriff auf Added per LotusScript?
Beitrag von: eknori am 18.05.06 - 09:18:19
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


( ich glaube, das stand mal im LDD )

EDIT:

Ahh, hier (http://www-10.lotus.com/ldd/46dom.nsf/c21908baf7e06eb085256a39006eae9f/40e371cd4984bb1085256b5f003f3aff?OpenDocument) ist es


Titel: Re: Zugriff auf Added per LotusScript?
Beitrag von: ghost am 18.05.06 - 09:47:35
Super!! Genau danach habe ich gesucht!

Vielen Dank
ghost