如何知道rtf域 附件的 文件个数?
Dim doc As notesdocument
Dim o As NotesEmbeddedObject
Dim attfile As String
Dim j As Integer
Dim jjj As Integer
Dim rtitem As Variant
jjj=0
For i = 1 To dc.Count
Print jjj
Set doc = dc.GetNthDocument(i)
Set rtitem = doc.GetFirstItem("body")
j=0
Forall oo In rtitem.EmbeddedObjects
If ( oo.Type = EMBED_ATTACHMENT ) Then
j = j + 1
End If
End Forall
Msgbox j
Next
我的代码有时运行正常,有时就正常 ,报错如下:
Type dismatch
其中body是rtf域