Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


Don R Green 13.Jul.07 12:12 PM a Web browser
Notes Client 6.0.2 CF2 Windows 2000


I have an agent that extracts embedded objects from the Body text of a document. It came accross a document that does not have an EMBEDDEDOBJECTS array and threw the error:

Instance member EMBEDDEDOBJECTS does not exist

I've tried several things to no avail.

Because there is no EmbeddedObjects array, the line
"If Isarray (rtitem.EmbeddedObjects) Then" fails.
How can I verify that an array exist in the item?

Please check the code below and recommend how I can check for an array.

'----------------------------------------------------
If docMain.HasItem("Body") Then
'get the Subject item of the main document
Set itemBody = docMain.GetFirstItem("Body")

'now check for ebmedded objects in the Body text of ritem
Set rtitem = docMain.GetFirstItem( "Body" )

If Isarray (rtitem.EmbeddedObjects) Then
'get "Instance member EMBEDDEDOBJECTS does not exist"
Forall o In rtitem.EmbeddedObjects
If Not (o Is Nothing) Then
If ( o.Type = EMBED_ATTACHMENT ) Then
AttachmentName = o.Name
....blah blah blah
Call o.ExtractFile _
(FolderName & Cstr(DocCntr) & "_" & FromStr & "_" & "ATTCHMNT" & "_" & AttachmentName)
End If
End If
End Forall

Else
Print #outputFile, "Attachment: Not an object array. "
End If
Print #outputFile, itemBody.Text
Else
Print #outputFile, "*** NO BODY TEXT IN EMAIL ***"
End If
'----------------------------------------------------


I've tried the following to check for EmbeddedObjects:

'If ( rtitem.Type = RICHTEXT ) Or ( rtitem.Type = TEXT ) And docMain.HasEmbedded And Not(Isempty(rtitem.EmbeddedObjects)) Then
'If rtitem.hasitem("EmbeddedObjects") Then 'no such luck
'If (rtitem.EmbeddedObjects) Then
'If Not Isempty(rtitem.EmbeddedObjects) Then
'If Not (rtitem.EmbeddedObjects) Is Nothing Then
'If Isarray (rtitem.EmbeddedObjects) Then
'get "Instance member EMBEDDEDOBJECTS does not exist"
'when doc does not have EMBEDDEDOBJECTS
'If docMain.HasEmbedded Then
'get "Instance member EMBEDDEDOBJECTS does not exist"


Thanks for your help!






how to check for rtitem has embedde... (Don R Green 13.Jul.07)
. . RE: how to check for rtitem has emb... (Mike Edgewater 13.Jul.07)
. . RE: how to check for rtitem has emb... (Don R Green 13.Jul.07)
. . . . Yes, EmbeddedObjects will only be o... (Mike Edgewater 13.Jul.07)
. . . . . . RE: Yes, EmbeddedObjects will only ... (Don R Green 13.Jul.07)
. . RE: how to check for rtitem has emb... (Mike Edgewater 13.Jul.07)
. . RE: how to check for rtitem has emb... (Kenneth Haggman... 13.Jul.07)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite