Hallo,
ich bin hier am verzweifeln!
Folgenden Problematik.
Wir veröffentlichen auf unserer Webseite in Notes erstellte Dokumente (was auch sonst ). und jetzt soll zudem definitiv noch dri9n stehen wann diese Dokumente veröffentlicht wurden. Das bedeutet ich brauche das addedtofile Datum, da die Dokumente nach dem Replizieren bei uns als veröffentlicht gelten. Dies ist ja nun definitiv nicht per Formel möglich, also habe ich mir, getreu dem Motto "Warum das Rad 2 mal erfinden" ein Workaround aus dem Netz geholt
(anbei) ... das macht erstmal das was ich erwartet habe, ich bekomme mein addedtofile datum....nur wie bekomme ich das jetzt in ein Feld bzw. in einen berechneten Text????
mit einem scheduled agenten möchte ich das ungern tun, da es dann bestimmt zu überschneidungen kommt...also berechnet zur Anzeige wäre mein wunsch hierfür
gibt es da ein möglichkeit???
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
Dim child As NotesDOMNode
Dim elt As NotesDOMNode
Dim attrs As NotesDOMNamedNodeMap
Dim a As NotesDOMAttributeNode
Dim i As Integer
Dim xmlHierLevel As Integer
Dim unid As String
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
Sub Initialize
Dim s As New notessession
Dim db As NotesDatabase
Dim doc As notesdocument
Dim col As notesdocumentcollection
Set db = s.CurrentDatabase
Set doc = db.UnprocessedDocuments.GetFirstDocument
add = addedtofile(doc)
Msgbox add
Alles anzeigen