美文网首页
跟踪谁正在读哪个文档

跟踪谁正在读哪个文档

作者: IT小C | 来源:发表于2016-04-02 17:18 被阅读18次

Description:  There have been times where you what to see who has been reading what documents in a database. This helps track if the right audiance is looking at your documents and what documents are being used and which ones are not beeing looked at.

There are 2 methods to accomplish this:
In the Terminate event of the database document, put the following script in. This script will do 2 things when a document is closed:

a) it will mail a notice to a log database that you have to create. This database you can create from a blank template and create one form called a "memo" with 3 fields: From, Subject & PostedDate. And

b) update a "who_read" field you add to the form.

Obviously you do not need both features, just 1 of them: either create a database log of who reads what documents or a reader field.

Code:

Dim session As New NotesSession 
Dim workspace As New NotesUIWorkspace 
Dim maildb As NotesDatabase
Dim maildoc As NotesDocument
Dim uidoc As NotesUIDocument 
Dim doc As NotesDocument
Dim item As NotesItem

Set uidoc = workspace.currentdocument
Set doc = uidoc.Document 

' Get the reader name and current date & time 
user = Evaluate("@Name([Abbreviate]; @UserName)")
dateread = Evaluate("@Now")
readstring = user(0)
readstringdate = dateread(0)
displayall = readstring & " : " & readstringdate

' Append the current reader and date to the WhoRead field 
Set item = doc.GetFirstItem( "WhoRead" ) 
Call item.AppendToTextList(displayall) 
Call doc.Save(False,True)

' Mail the data to the log database for easy searching 
mailsubject = uidoc.FieldGetText("Subject") 
Set maildb = session.currentdatabase
Set maildoc = New NotesDocument ( maildb )
maildoc.Form = "Memo"
maildoc.SendTo = "name of mail-in database"
maildoc.Subject = "Read America Wire Dcoument titled: " + mailsubject
Call maildoc.Send( False ) 

相关文章

  • 跟踪谁正在读哪个文档

    Description: There have been times where you what to see ...

  • Ocelot中文文档-跟踪

    Ocelot使用一个杰出的项目Butterfly 提供了跟踪功能。 为了使用跟踪,请阅读Butterfly的文档。...

  • 如何建立有效的数据备份机制?

    一、对内网中重要文档的流转进行跟踪备份,包括文档打印、IM文档传输、邮件附件文档发送、移动存储设备的文档拷贝等等,...

  • OpenCV+Python 基于MeanShift、CAMShi

    OpenCV官方文档 物体跟踪 在一开始告诉程序一个跟踪目标,即我想跟踪什么,然后程序就在接下来的视频帧中去寻找这...

  • Schema约束

    名称空间:告诉xml文档中的元素被哪个schema文档约束

  • 谁还在读书?

    下午要去明德楼办事,看到一位保安师傅,很专心地在看一本厚厚的小说,一问才知是《战争与和平》,甚是惊讶,心想:莫非是...

  • 需求分析(五)

    议题 需求跟踪 变更需求代价:影响分析 变更需求代价 影响分析 需求跟踪包括编制每个需求同系统元素之间的联系 文档...

  • 哪个谁

    谁的心在云上飞 谁的眼在找谁 谁给了谁一壶老酒谁又喝醉 睡梦里回忆不再追 也不知冷风再吹 不知曾和谁相偎 十五的月...

  • bedtools nuc命令:按区域统计碱基比率和个数

    nuc 帮助文档 bedtools nuc;用哪个参数看哪个,对着命令来看帮助文档,那就是2分钟的事情,全篇看帮助...

  • 别以敏捷的名义裸奔!

    敏捷团队在减少沟通浪费的同时,也会利用各种产品工具、技术脚本甚至是连接更多现成的文档来保证内部跟踪,因为跟踪会使团...

网友评论

      本文标题:跟踪谁正在读哪个文档

      本文链接:https://www.haomeiwen.com/subject/vxzylttx.html