我的笔记

导航

替换富文本中的某行信息

    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)

 

posted on 2010-09-23 11:58  sheme  阅读(301)  评论(0编辑  收藏  举报