我的笔记

导航

富文本修改某行信息(修改办理意见)

以修改办理意见为例子:

 

 

 

 

Sub Initialize
    
Dim Session As New NotesSession
    
Dim Db As NotesDatabase
    
Dim Docs As NotesDocumentCollection
    
Dim Doc As NotesDocument
    
    
Set Db = Session.CurrentDatabase
    
Set Docs = Db.UnprocessedDocuments
    
Set Doc = Docs.GetFirstDocument
        
        
Dim item_show As NotesItem
    
Dim key As String
    key 
="待修改的意见"
    
Dim v As String
    
Set item_show =doc.GetFirstItem("HowDo_Crouse")
    
For i = 0 To UBound(item_show.Values)
        
If Not InStr(item_show.Values(i),key) > 0 Then    
        v
=v+";"+item_show.Values(i)

        
Else
            v
=v+";"+"替代的意见"
        
End If
    
Next
    
    
If v<>"" Then
        
Call doc.ReplaceItemValue(item_show.Name,"")
        
Dim vv As Variant
        vv
=Split(v,";")
        
Call item_show.AppendToTextList(vv)
    
Else
        
Call doc.ReplaceItemValue(item_show.Name,"")
    
End If

        
Call Doc.Save(TrueTrue)
    
End Sub

 

 

posted on 2010-10-09 10:04  sheme  阅读(228)  评论(0)    收藏  举报