Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

embeddedObjects not working as documented - Type Mismatch bug?

619 views
Skip to first unread message

robot

unread,
Oct 3, 2001, 12:18:54 AM10/3/01
to
Am I nuts, or is there a basic bug in 5.08 accessing embeddedObjects. The
following example comes right out of the designer help, and generates a Type
Mismatch error in the Forall loop. How do I access all the embeddedObjects
(attached files). I tried setting a variant to doc.EmbeddedObjects and got
nothing. What's the trick? Is this a bug?

Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = New NotesDatabase( "SanFrancisco", "hill.nsf" )
Set view = db.GetView( "All Documents" )
Set doc = view.GetLastDocument
Forall o In doc.EmbeddedObjects
Messagebox( o.Name )
End Forall


Lyn Perry

unread,
Oct 3, 2001, 8:54:59 AM10/3/01
to
I've not had a problem accessing embedded objects.

' Always look for attachment before processing
If doc.HasEmbedded Then
Forall i In doc.Items
If i.Type = 1084 Then
Forall v In i.Values
Set object = doc.GetAttachment( v )
If ( object.Type = EMBED_ATTACHMENT ) Then
Messagebox( o.Name, 0 + 64, "Attachment Name" )
End If
End Forall
End If
End Forall
End If

robot wrote in message ...

robot

unread,
Oct 3, 2001, 8:38:25 PM10/3/01
to
Thanks Lyn. That seems to work (except for the messagebox, which wanted a
function return value). Maybe Lotus will change their documentation to use
your approach.

Just one more question for this inexperienced lotuscripter: where is 1084
defined? I really dislike explicit values like that, much preferring a
symbolic name. I checked the lss files, and no go. So I'm not sure where
these values are defined.

thanks again for any further pointers.

"Lyn Perry" <perrybl@[204.52.135.1]> wrote in message
news:9pf1v3$v67$1...@news.hal-pc.org...

Lyn Perry

unread,
Oct 13, 2001, 9:27:15 AM10/13/01
to
Use "Attachment" instead of 1084.

Remove parenthesis from messagebox line. I just expanded the original
statement provided. It appears that there is more than one problem with
their example code.

robot wrote in message
<5cOu7.34894$3d2.1...@bgtnsc06-news.ops.worldnet.att.net>...

data...@gmail.com

unread,
Apr 23, 2014, 9:59:47 AM4/23/14
to
Good approach. Thank you - works perfectly.
0 new messages