埋め込みオブジェクトが含まれていない場合は、EmbeddedObects プロパティは EMPTY を返します。以下に例を示します。
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
'...set value of doc...
Set rtitem = New NotesRichTextItem _
( doc, "ProjectDescription" )
Call rtitem.AppendText _
( "Cartoon book for children ages 9-12" )
Call doc.Save( False, True )
Dim docA As NotesDocument
Dim docB As NotesDocument
Dim rtitem As NotesRichTextItem
'...set values of docA and docB...
Set rtitem = New NotesRichTextItem _
( docA, "ProjectDescription" )
Call rtitem.AppendText _
( "Cartoon book for children ages 9-12" )
Call rtitem.CopyItemToDocument( docB, "" )
Call docA.Save( False, True )
Call docB.Save( False, True )
Dim session As New NotesSession
Dim db As NotesDatabase
Dim memo As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
'...set value of doc...
Set memo = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( memo, "Body" )
Call rtitem.AppendDocLink( doc, db.Title )
memo.Subject = "Here's a link to the document"
Call memo.Send( False, "Frank Glennel" )
Dim doc As NotesDocument
Dim rtitem As Variant
'...set value of doc...
Set rtitem = doc.GetFirstItem( "ProjectDescription" )
If rtitem.Type = RICHTEXT Then
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText _
( "Book is 64 pages, full color." )
End If
Call doc.Save( False, True )
埋め込みオブジェクトが含まれていない場合は、EmbeddedObects プロパティは EMPTY を返します。以下に例を示します。
Dim doc As NotesDocument
Dim rtitem As Variant
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
If Not Isempty(rtitem.EmbeddedObjects) 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
End If