首先:如果没有看到您的代码,几乎不可能提供帮助。
尽管如此,我还是尝试了:NotesRichtextitems 需要先保存,然后才能显示在前端。所以你需要有一个“CloseAndReopen” - 函数,它会进行更新,保存后端文档,然后重新打开文档。像这样的东西:
'Declare variables
Dim ses As New NotesSession
Dim db As NotesDatabase
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim body As NotesRichtextitem
Dim strUnid As String
'- Set database to get the document
Set db = ses.CurrentDatabase
'- get the current uidoc
Set uidoc = ws.CurrentDocument
'-save it, otherwise you will not be able to access the richtextitem
If uidoc.IsNewDoc Then Call uidoc.Save()
'- Get The backend document
Set doc = uidoc.Document
'- Get the richtextitem
Set body = doc.GetFirstItem( "Body" )
'- and do something with it
Call body.AppendText( "some very interesting text" )
Call body.AddNewline( 2 )
'- found this useful to make the Richtextitem have the changes directly
Call body.Compact()
'- Save it
Call doc.Save( True, True, True )
'- get the unid to be able to reopen
strUnid = doc.UniversalID
'- Make the "do you want to save" disappear
Call uidoc.Document.ReplaceItemValue( "SaveOptions" , "0" )
'- close it
Call uidoc.Close
'- Destroy the object for the doc (otherwise it might NOT really close)
Delete Doc
'- get it back
Set doc = db.GetDocumentByUNID( strUnid )
'- and reopen
Call ws.EditDocument( False , doc )
对于您的视图问题:NotesView.Refresh 不会重建视图的索引。它只是用你初始化对象后发生的一切刷新你的内存表示。但可能“NotesView.AutoUpdate=True”可能会有所帮助。但可能您的服务器只是忙于使视图索引保持最新,或者视图未配置为自动更新(检查视图属性)......
再说一遍:没有代码,这只是盲目猜测......