Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs







Recent posts

Wed 18 Sep 2019

Perils of PDF 5: Data Confusion



Mon 16 Sep 2019

About that email in Notes



Mon 9 Sep 2019

Perils of PDF 4: Missing and obscured data


November, 2019
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