Lotus Notes Attachments

W

ward376

I made an Excel workbook with vba that users in the field use to
create and attach a file to an email and send it. I then was expecting
that I could use vba to collect and manipulate the attachments.

The issue is that the code I'm using will grab any attached file
except these automated attachments. I had noticed that the code didn't
pick up some other csv files created from another application (don't
know what it is) from another, unrelated source.

Here are the variables to create the attachments:
stAttachment = activeworkbook.FullName
Set noAttachment = noDocument.CreateRichTextItem("stAttachment")
Set noEmbedObject = noAttachment.EmbedObject(EMBED_ATTACHMENT, "",
stAttachment)

and the lines to collect the attachments:
If noDocument.HasEmbedded Then
Set vaItem = noDocument.GetFirstItem("Body")
If vaItem.Type = RICHTEXT Then
For Each vaAttachment In vaItem.EmbeddedObjects
If vaAttachment.Type = EMBED_ATTACHMENT Then
vaAttachment.ExtractFile stPath & Format(Date,
("mmddyy")) & " " & _
vaAttachment.Name
End If
Next vaAttachment
End If
End If
Set noDocument = noNextDocument
Loop

I think the issue may be that the automated attachments aren't in the
body of the email, but I'm not familiar enough with Lotus Notes'
object model to know where else to look or how to refer to it. They
both are embedded rich text items... right?

I tried to put noEmbedObject in the body of the emails, but it causes
an automation error. Probably has to be a string? How does it work
when you attach files manually?

So - how can I collect these automated attachments with vba?

This is also posted in Lotus Notes Programming
http://groups.google.co.uk/group/co...d6e32/77e7acca2cf3cb85?hl=en#77e7acca2cf3cb85

Thanks!
Cliff Edwards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top