RE: Get attachment names using vbscript Karl-Henry Martinsson 28.Feb.13 02:44 PM a Web browser General All ReleasesAll Platforms
>I am able to use Karl-Henry suggestion but I do not
>want to restrict to attachments only in richtextitem
You need to specify restrictions like that in your first post. In a comment to my code, you talked about attachment made from the web, that information should have been in the initial post. Now I wasted time coming up with a solution that was not what you needed, because you did not bother to specify everything.
Take a look at the GetAttachment method of the NotesEmbeddedObject class:
"Given the name of a file attachment, returns a NotesEmbeddedObject representing the attachment. You can use this method to find file attachments which are not contained in a rich text item (such as an attachment in a Release 2 database), as well as file attachments that are contained in a rich text item."
You may already have a field on the document containing a list of attachments (using @AttachmentNames), but if not, you can use Evaluate (yes, sometimes it can be used, like here):
attachments = Evaluate("@AttachmentNames", doc)
For i = 0 To Ubound (attachments)