Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs







Recent posts

Wed 5 May 2021

Pull public data into Notes on the fly



Thu 29 Apr 2021

Archive a Notes DB off-line w/ Field data and active content



Tue 20 Apr 2021

Archive a Notes DB off-line in 4 easy steps


June, 2021
SMTWTFS
  01 02 03 04 05
06 07 08 09 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

Search the weblog





























Genii Weblog

Using FileCreated and FileModified in Midas

Tue 27 Sep 2005, 04:20 PM



by Ben Langhinrichs
I noticed that the Midas documentation shows the FileCreated property and FileModified property, it does not explain how to use them with all the different time type variables available in LotusScript.  These are the created and modified time for an attachment or embedded object, and can be very useful to know, but only if you can figure outhow to use them.  So, here is a short snippet I will add to the Help database soon:

Option Public
Option Declare
Uselsx "*lsxrtc"    
Sub Initialize
   DimAs New NotesSession
   Dim doc As NotesDocument
   Dim ret As Variant
   Dim ntime As NotesDateTime
   Set doc = s.DocumentContext
   Dim rtitem As New GeniiRTItem
   Dim rtchunk As GeniiRTChunk
   Call rtitem.ConnectBackend(doc.Handle, "Body", True)
   Set rtchunk = rtitem.DefineChunk("File 1")
   Print "File Size is& Cstr(rtchunk.FileSize) & " bytes"
   Print "File Created: " & Cstr(rtchunk.FileCreated)
   Print "File Modified: " & Cstr(rtchunk.FileModified)
   Set ntime = New NotesDateTime("")
   ntime.LSLocalTime = rtchunk.FileModified
   doc.FileWasModified = rtchunk.FileModified
   Call doc.Save(True, False)
End Sub

I hope that helps.

Copyright 2005 Genii Software Ltd.

What has been said:

No documents found