Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Attachment from RichTextItem

Status
Not open for further replies.

Rofeu

Technical User
Apr 13, 2005
500
NL
Hello,

I'm trying to get the first attachment from richtextitem x.

I managed to get the names from all the attachments in the document, but my code fails when I try to get the attachments from only the richtextitem.

How can I determine from which field the attachments are coming?

I've the below that gives me all the attachments:

Code:
Dim ret As Variant
Dim I As Integer
Dim Attachment As NotesEmbeddedObject

ret = Evaluate("@AttachmentNames", subdoc)

For I = LBound(ret) To UBound(ret)
Set Attachment = subdoc.GetAttachment(ret(I))

Next I

I tried the following to get only the attachment from the richtextitem:

Code:
Dim rtitem As Variant
Dim object As NotesEmbeddedObject

Set rtitem = doc.GetFirstItem( "X" )
Set object = rtitem.GetEmbeddedObject( "TEST.xls" )

MessageBox object.source

set rtitem = nothing
set object = nothing

This fails, but I do not know why.

Any suggestions?

Cheers,

Roel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top