How to extract embeded object from richtext

how to extract embeded object from richtext item.

follwoing code giveing type mismatch error

Forall o In rtitem.EmbeddedObjects [ Error shows at this line]

If ( o.Type = EMBED_OBJECT ) Then

 Call o.ExtractFile( "c:\test\" & o.Source )

 Call o.Remove

 Call doc.Save( False, True )

End If

End Forall

Subject: how to extract embeded object from richtext

Add the following checks possibly…

if rtItem is nothing then

MsgBox “The RT Item doesn’t exisit or is not instantiated.”

else 'We have an object of some sort but is it an RT Item

if rtItem.type <> RICHTEXT then

MsgBox "rtItem is not a rich text Item. "

else

Forall o In rtitem.EmbeddedObjects [ Error shows at this line]

  If ( o.Type = EMBED_OBJECT ) Then

    Call o.ExtractFile( "c:\test\" & o.Source )

    Call o.Remove

    Call doc.Save( False, True )



  End If

End Forall

end if ’ rtItem.type <> RICHTEXT then

end if 'rtItem is nothing

Subject: how to extract embeded object from richtext

did u check if your rtitem is a richtext item or not?

Subject: how to extract embeded object from richtext

Use Is Empty method accross the rtitem.EmbeddedObjects to verify the objects.

Subject: how to extract embeded object from richtext

Hello Deen Bandhu,

Did you finally get the code working? I am in an exact same situation where I need to dump a bunch of EMBEDDED (not ATTACHED) objects (such as Excel, Word, etc.) from a Notes database to a local or shared drive so they can be migrated into another system.

Please let me know if you have the code (LotusScript agent) as I am NOT a programmer and don’t know any LotusScript.

Thank You in advance.

Shyam Dalmia

Subject: how to extract embeded object from richtext

Add the following checks possibly…

if rtItem is nothing then

MsgBox “The RT Item doesn’t exisit or is not instantiated.”

else 'We have an object of some sort but is it an RT Item

if rtItem.type <> RICHTEXT then

MsgBox "rtItem is not a rich text Item. "

else

Forall o In rtitem.EmbeddedObjects [ Error shows at this line]

  If ( o.Type = EMBED_OBJECT ) Then

    Call o.ExtractFile( "c:\test\" & o.Source )

    Call o.Remove

    Call doc.Save( False, True )



  End If

End Forall

end if ’ rtItem.type <> RICHTEXT then

end if 'rtItem is nothing