1

In cases when two attachments with the same filename are attached to a Notes Document, the second file is renamed internally to something like ATTXXXX. Even if the first filename is deleted and document re-saved, the internal filename remains cryptic.

There doesn't seem to be any way to retrieve the original Filename through back-end functions. I have looked high and low in LS but also in the C++ API, and could find nothing. It seems to be a trick that can only be done in the front-end. I am not sure where the information in the file icon graphic is stored, and whether it is accessible. In simple cases it would be possible to do a rename, I suppose (i.e. there is a single attachment and a single file icon graphic).

Could anybody confirm that this is, indeed a limitation of Notes or is there a cool way to solve this?

This is causing me some headaches whilst processing a large number of documents. My customer has trouble believing that there are some things that can only be done in the front end.

Karl-Henry Martinsson
  • 2,770
  • 15
  • 25
Andrew Magerman
  • 1,394
  • 1
  • 13
  • 23

2 Answers2

2

You should be able to get the original filename, even with duplicates. It is not when the file is attached that the name is changed, it is when you detatch it. You are probably using the .Name property, try the .Source property of the EmbeddedObject, that should return the original filename.

From the help:

  • If the NotesEmbeddedObject is an embedded object or object link, this property returns the internal name that Notes uses to refer to the source document.
  • If the NotesEmbeddedObject is a file attachment, this property returns the file name of the original file.

Syntax To get: source$ = notesEmbeddedObject.Source

Karl-Henry Martinsson
  • 2,770
  • 15
  • 25
0

It's in the CD records for the rich text -- you will see it if you use NotesPeek to examine the contents of the rich text item. But I don't think it's accessible through the NotesRichText navigator class, so I'm pretty sure you would have to go the C API and parse through the CD records. Or, the MIDAS Rich Text API can probably get it, but that's third party software. I.e., not free.

Naveen
  • 6,786
  • 10
  • 37
  • 85
Richard Schwartz
  • 14,463
  • 2
  • 23
  • 41