Forum: สอบถามปัญหา Notes ทางด้านพัฒนาโปรแกรม (Note Client) |
Tags1: | Created on May 28, 2009, 2:37 PM by ohoaha/9Notes|Topic Responses: 6 |
&action=openDocument&documentId=2EDA |
กรณีของคุณ 9Notes มันจะเช็คที่ตัว document หรือเปล่าคะ เพราะฉะนั้นถ้าในฟอร์มมี richtext มากกว่า 1 field ก็จะใช้วิธีนี้ไม่ได้
ไม่รู้ว่าคุณ nana ตั้งใจจะจำเพาะเจาะจงที่ field นั้นหรือเปล่า ถ้าเป็นแบบนั้นใช้ Lotus script ดีกว่าค่ะ ศึกษาในเรื่อง NotesembededObject ดูนะคะ
ตัวอย่าง
Dim doc As NotesDocument
Dim rtitem As Variant
Dim attachCount As Integer
Dim linkCount As Integer
Dim objectCount As Integer
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
attachCount = 0
linkCount = 0
objectCount = 0
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
Select Case o.Type
Case EMBED_ATTACHMENT:
attachCount = attachCount + 1
Case EMBED_OBJECTLINK:
linkCount = linkCount + 1
Case EMBED_OBJECT:
objectCount = objectCount + 1
End Select
End Forall
End If
Print( attachCount & " attachments " & linkCount & _
" links " & objectCount & " objects " ) |
|