Lotus Notes 视图:检索上次打开时间
Lotus notes views: retrieve last opened time
是否有 method/trick 可以查找上次打开视图的时间?
在设计器中,如果我右键单击一个视图,在 'info' 选项卡中有一个参数 'Accessed' 我认为与我正在寻找的参数相对应。
有一个技巧 o 方法可以检索该值 ?
下面的代码将为您数据库中的每个视图提供 "Last Accessed" 日期和时间。请注意,(根据帮助文件)此值不精确到超过 24 小时,就像在 24 小时内多次访问文档一样,最后访问的值不会更新。
Dim db As NotesDatabase
Dim s As New NotesSession
Dim nc As NotesNoteCollection
Dim doc As NotesDocument
Dim ID As String
Dim title As string
Set db = s.Currentdatabase
Set nc = db.createNoteCollection(False)
nc.Selectviews = true
Call nc.Buildcollection()
id = nc.Getfirstnoteid()
While Not id = ""
Set doc = db.Getdocumentbyid(id)
title = doc.getitemvalue("$Title")(0)
Print title & ": " & doc.Lastaccessed
id = nc.Getnextnoteid(id)
Wend
要对一个特定视图执行相同操作:
Dim db As NotesDatabase
Dim s As New NotesSession
Dim nc As NotesNoteCollection
Dim doc As NotesDocument
Dim ID As String
Dim title As String
Dim view As NotesView
Set db = s.Currentdatabase
Set view = db.GetView("MyViewName")
Set nc = db.createNoteCollection(False)
Call nc.Add(view)
Call nc.Buildcollection()
id = nc.Getfirstnoteid()
While Not id = ""
Set doc = db.Getdocumentbyid(id)
title = doc.getitemvalue("$Title")(0)
Print title & ": " & doc.Lastaccessed
id = nc.Getnextnoteid(id)
Wend
是否有 method/trick 可以查找上次打开视图的时间? 在设计器中,如果我右键单击一个视图,在 'info' 选项卡中有一个参数 'Accessed' 我认为与我正在寻找的参数相对应。 有一个技巧 o 方法可以检索该值 ?
下面的代码将为您数据库中的每个视图提供 "Last Accessed" 日期和时间。请注意,(根据帮助文件)此值不精确到超过 24 小时,就像在 24 小时内多次访问文档一样,最后访问的值不会更新。
Dim db As NotesDatabase
Dim s As New NotesSession
Dim nc As NotesNoteCollection
Dim doc As NotesDocument
Dim ID As String
Dim title As string
Set db = s.Currentdatabase
Set nc = db.createNoteCollection(False)
nc.Selectviews = true
Call nc.Buildcollection()
id = nc.Getfirstnoteid()
While Not id = ""
Set doc = db.Getdocumentbyid(id)
title = doc.getitemvalue("$Title")(0)
Print title & ": " & doc.Lastaccessed
id = nc.Getnextnoteid(id)
Wend
要对一个特定视图执行相同操作:
Dim db As NotesDatabase
Dim s As New NotesSession
Dim nc As NotesNoteCollection
Dim doc As NotesDocument
Dim ID As String
Dim title As String
Dim view As NotesView
Set db = s.Currentdatabase
Set view = db.GetView("MyViewName")
Set nc = db.createNoteCollection(False)
Call nc.Add(view)
Call nc.Buildcollection()
id = nc.Getfirstnoteid()
While Not id = ""
Set doc = db.Getdocumentbyid(id)
title = doc.getitemvalue("$Title")(0)
Print title & ": " & doc.Lastaccessed
id = nc.Getnextnoteid(id)
Wend