Subject: HasEmbedded True but getEmbedded returns nothing
How are you trying to actually get a handle on the attachment(s) in question?
“GetEmbeddedObject” is a method you call on a NotesRichTextItem object, not a NotesDocument. The equivalent method for a document is “GetAttachment” (not the same).
You have to extract so-called “v2-style” attachments from the NotesDocument containing them, rather than the more usual NotesRichTextItem object. This is because these attachments are in the document itself, rather than within a rich text field in the document.
Subject: RE: HasEmbedded True but getEmbedded returns nothing
Hi,Thank you very much for the reply.
While going through all these froum I found that this attachemnt is V2-Style attachment ( most probaby created using web browser… though not sure…in 6.0 version…I have 5.2 version of notes client)
This attachment is not part of RichText Body but it is outside it …i donno how attached to the document.
When i use the code…
Set rtitem = domShowDocument.GetFirstItem("Body")
If domShowDocument.HasEmbedded Then
If rtitem.Type = RICHTEXT Then
For Each embObj In rtitem.EmbeddedObjects
Here I get error TypeMismatch and get embobj as nothing
next embObj
....
.....
When I look into the lotus client to see how this document looks …it has attachments (which we understand from the value when we get domShowDocument.HasEmbedded = true
but it has different kind of icon and it is definately outside the body part.
When I use
set embobj = domShowDocument.GetFirstItem(“$File”) I do get this object (where embobj is type object in definition)
but I donno How to extract this file because when i get embobj from the BODY part i can use embObj.ExtractFile method on it but when i get this object from GetFirstitem(“$File”) I do not get the method embObj.ExtractFile.
plus with this GetFirstItem(“$File”) if i look for .Values it returns empty objects though it does have attachments.