Page 1 sur 1

Nom de champ ?

MessagePublié: 05 Jan 2004 à 18:10
par PhilippeG
Bonjour et bonne année à tous,Je voudrai accéder à l'information "modified in this file"c'est la 4ème ligne de l'onglet information dans les propriétés d'un document mais je ne trouve pas le nom du champ dans lequel notes stocke cette datequelqu'un a t il cette info ? (j'ai essayé $modified et $added mais ce n'est pas cela)merci

Re: Nom de champ ?

MessagePublié: 05 Jan 2004 à 21:54
par Stephane Maillard
Bonjour,Si mes souvenir sont bon dans le Lotus API Guides 5.0.6 une infortions est intérrogeable pour avoir cette information.Download sur www.ibm.com[%sig%]

Re: Nom de champ ?

MessagePublié: 05 Jan 2004 à 22:07
par AdminExpert
en LS il y a déjà les propriétés de l'objet NotesDocument:- dateV = notesDocument.LastAccesseddonne la date du dernier accès ou date de la dernière modification- dateV = notesDocument.LastModifieddonne la date de la dernière modificationdateV est un objet de type varianten LS si tu souhaites accèder aux champs préfixés par le signe '$' il faut procéder de la manière suivante :dateV=Doc.~$UpdatedBydateV=Doc.~$Revision

Re: Nom de champ ?

MessagePublié: 05 Jan 2004 à 22:13
par Stephane Maillard
Bonjour,Je dis encore bravo.Mes propositions faîtes sur d'autre discussion peuvent être anonymous sans que je paresse.[%sig%]

Re: Nom de champ ?

MessagePublié: 05 Jan 2004 à 22:32
par AdminExpert
j'ignorai ton post à ce sujet... sincèrement désoléce n'est pas d'aujourd'hui que je tiens ce genre d'astuce... celle-ci m'a été donnée par Lotus (il y a 5 ans au moment d'une formation) - à propos l'accès aux champs $

Re: Nom de champ ?

MessagePublié: 09 Jan 2004 à 09:43
par PhilippeG
Bonjour,Pour ceux que cela intéresse voila un code qui crée une fonction récupérant l'information added in this file (propriétés du document onglet information,3ème ligne). Cette date est la date de création de la replique du document dans la base en cours (a ne pas confondre avec la date de création du document)J'ai trouvé ce code sur un autre forum mais en anglais celui la (http://www-10.lotus.com/ldd/communities.nsf/)Const wAPIModule = "NNOTES" ' Windows/32Const NOTE_ADDED_TO_FILE = 13Declare 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 IntegerDeclare Private Function NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _( Byval P As String, hDB As Long) As IntegerDeclare Private Function NSFDbClose Lib wAPIModule Alias "NSFDbClose" _( Byval hDB As Long) As IntegerDeclare Private Function NSFNoteOpen Lib wAPIModule Alias "NSFNoteOpen" _( Byval hDB As Long, Byval NoteID As Long, Byval F As Integer, hNT As Long) As IntegerDeclare Private Function NSFNoteClose Lib wAPIModule Alias "NSFNoteClose" _( Byval hNT As Long) As IntegerDeclare Private Function NSFNoteGetInfo Lib wAPIModule Alias "NSFNoteGetInfo" _( Byval hNT As Long, Byval M As Integer, V As Any) As IntegerDeclare Private Function OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" _( Byval zP As Long, Byval S As String, Byval F As String, Byval N As String) As IntegerDim db As NotesDataBaseDim coll As NotesDocumentCollectionDim doc As NotesDocumentDim modified As VariantSub Click(Source As Button) Dim session As New NotesSession Dim db As NotesDataBase Dim coll As NotesDocumentCollection Dim doc As NotesDocument Dim modified As Variant Dim AtModified As New NotesDateTime( "") Set db = session.CurrentdataBase Set coll = db.UnprocessedDocuments Set doc = coll.getFirstDocument Do While Not (doc Is Nothing) InfoDate$ = AddedToFile(doc) Set doc =coll.GetNextDocument(doc) LoopEnd SubFunction AddedToFile(doc As NotesDocument) As String With doc.ParentDatabase dbA$ = String$(1024, " ") OSPathNetConstruct 0, .Server, .FilePath, dbA$ End With Dim hDB As Long NSFDbOpen dbA$, 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 hDBEnd Function