如何使用户在对原文档进行修改后留下修改痕迹呢?
虽然有版本控制功能可以使用,但又不太直观。实际上我们可以利用微软WORD的修订功能方便的实现该需求。实现如下:
首先在表单中创建一个RTF域body,以嵌入WORD文档对象。
而后将下列程序加入到表单建立以后的过程中即可:
Dim db As New notesdatabase(servername,"jswfw")
Dim handle As Variant Dim doc As NotesDocument
Set doc=source.document
Dim rtitem As Variant
Dim object As NotesEmbeddedObject
Set rtitem = doc.GetFirstItem( "Body" )
Dim session As New NotesSession
Dim user As String
user = session.commonUserName
If ( rtitem.Type = RICHTEXT ) Then
Set object = rtitem.GetEmbeddedObject( "Microsoft Word 文档" )
Set handle=object.activate(False)
handle.showgrammaticalerrors=False
handle.showspellingerrors=False handle.TrackRevisions = True handle.PrintRevisions = True handle.ShowRevisions = True handle.parent.UserName = user handle.parent.UserInitials = user handle.parent.UserAddress = "" handle.save End If 起草人在起草了文章后,单击该按钮,以后对该文章的所有修改都将保留痕迹。