1

I am fetching attachments in notes document using @AttchmentNames formula, This works as expected.

But issue come up at our production recently, attachments names not fetched by formula for the replied/forwarded messages(Messages are created with Reply/forward with Attachment option). I am trying to understand how attachments are stored in replied/forwarded messages and wondering whether replied/forwarded message contains just link to original attachment. Does fetching the attachments requires some different mechanism?

Unfortunately this behavior does not simulate on development. Any help is much appreciated.

Thanks in advance.

2 Answers2

0

I believe the @Formulas are unreliable, at least in the versions I've worked with. To get an accurate collection of attachments, I always needed to find the attachments within rich-text fields as well as in the document itself. I believe the @formulas only search one of those (but don't quote me) or perhaps it has to do with the type of attachment.

Anyway, you can get a more reliable list of attachment names using LotusScript. See more on this StackOverflow question.

To answer your other question: No, attachments always stay with the document itself. They'll never refer to attachments in another document. That said, the attachment could be a link to a file, like a shortcut. In that case what stays with the document is the link attachment, not what the link refers to, of course.

Community
  • 1
  • 1
Ken Pespisa
  • 21,989
  • 3
  • 55
  • 63
  • Ken, Thanks for Reply. Actually I had used similar kind of looping prior to using @AttachmentNames formula.
    Earlier i was looping on each item in document and checking for condition objItem.Name = "$FILE", objItem(0) gives me the attachment name. But doing this raised another issue, single attachment got repeated multiple times. Say there are three attachments in mail, extraction routine gives first attachment three times.
    I think I will try implementing your solution, Thanks.
    – Yogesh Rain Jan 20 '12 at 07:04
  • Oh. I am afraid.... Sorry Ken, it was my mistake in script and QC didnt reported issue correctly. @AttachmentFormula still works for me. But your suggestions improved my knowledge.... Thanks – Yogesh Rain Jan 23 '12 at 10:38
0

I would recommend two things. If you really want to learn about this look into LotusScript rich text fields. Next I would also look at the IBM discussions per your Notes version. Many people have already worked several solutions and have provided sample code. Hope this helps.