1) 如果判断要求不可以保存文档,那只好做个近似的检查无法检查RTF具体写了什么,只能知道它里面有没有东西:
Function CheckRTFField(uidoc As NotesUIDocument, strFieldName As String, strErrorMsg As String) As Boolean
On Error Goto ErrorHandle
CheckRTFField=True
If Not uidoc.EditMode Then
uidoc.EditMode=True
End If
Call uidoc.GotoField(strFieldName)
Call uidoc.SelectAll()
Call uidoc.DeselectAll()
Exit Function
ErrorHandle:
If Err=4407 Then
Msgbox "Error: "+strErrorMsg
CheckRTFField=False
Exit Function
Else
Resume Next
End If
End Function
上一页 [1] [2]