LOTUSSCRIPT /COM/OLE のクラス


例: IsNames プロパティ
次のスクリプトは文書に [SendTo] フィールドがあるかどうかを調べます。[SendTo] フィールドがある場合は、このフィールドに設定されている受信者に文書をメールで送信します。[SendTo] フィールドがない場合は、1 つ以上の名前を含む、文書内の最初の Names アイテムを検索し、そのアイテムに設定されているユーザー名に文書をメールで送信します。1 つ以上の値を含む Names アイテムがないとき、文書は送信されません。

Dim doc As NotesDocument
Dim item As NotesItem
Dim j As Integer
'...set value of doc...
Set item = doc.GetFirstItem( "SendTo" )
' if there's no SendTo item
' try to find another item of type Names, that has a value
If ( item Is Nothing ) Then
 Forall i In doc.Items
   If i.IsNames And ( i.Values( 0 ) <> "" ) Then
     Set item = i
     Exit Forall
   End If
 End Forall
 ' if we found an item of type Names
 ' mail the document to people in that item
 If Not ( item Is Nothing ) Then
   Call doc.Send( False, item.Values )
 End If
' if there is a SendTo item, no parameters needed    
' mail the document
Else
 Call doc.Send( False )
End If

関連項目