LOTUSSCRIPT /COM/OLE のクラス


例:EmbeddedObjects プロパティ
次のスクリプトは、文書の Body アイテムのすべての添付ファイル、オブジェクトリンク、および埋め込みオブジェクトを検索します。添付ファイルを見つけるたびに、ファイルを C ドライブの SAMPLES ディレクトリに移動し、文書からその添付ファイルを削除します。このスクリプトは、Body アイテムのオブジェクトリンクまたは埋め込みオブジェクトには影響しません。

Dim doc As NotesDocument
Dim rtitem As Variant
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
 Forall o In rtitem.EmbeddedObjects
   If ( o.Type = EMBED_ATTACHMENT ) Then
     Call o.ExtractFile( "c:\samples\" & o.Source )
     Call o.Remove
     Call doc.Save( False, True )
   End If
 End Forall
End If

関連項目