"Save and Delete All" feature

This is a superb feature, that is causing much excitement here amongst the test users who have the Notes 6 mail design.

However, I’ve been asked if it’s possible to extend it so that you can highlight a number of emails, and strip and save the attachments off all of them, in one go. Does anybody know if this new Notes 6 feature has any corresponding new LS methods?

I’ve had a quick look through the Domino Designer Help DB, and can’t find anything. I’d expect it to be part of the NotesDocument class.

Cheers,

  • Mike

Subject: “Save and Delete All” feature

Sure, it’s possible. You would use NotesDocument.EmbeddedObject and NotesRichTextItem.EmbeddedObjects. For those that are attached to the document (V2 style attachments) you would detach them and insert a note at the end stating that an attachment was removed, etc. For those that are in rich text fields, it should be possible to use a NotesRichTextRange and NotesRichTextNavigators to position to just after the attachment icon, insert your text, and then you can remove the attachment.

One thing to watch out for: if different emails contain a file with the same name, you’ll want to catch that and do something sensible.

Subject: RE: “Save and Delete All” feature

Andrew,

Thanks for your response. But do you know if there’s any way to programmtically access the Save dialog box, so you can get a path returned from it?

The only way I’ve seen to do this in the past is write directly to the Windows API. But this has to work on Macintoshes too.

Cheers,

  • Mike

Subject: RE: “Save and Delete All” feature

If @Prompt([LOCALBROWSE]…) doesn’t do it for you, then all I can suggest is to find the corresponding Mac system functions and write your code to detect OS and respond accordingly.

Subject: RE: “Save and Delete All” feature

@Prompt([LOCALBROWSE]…) returns a file rather than a folder. And it defaults to looking for a NotesDatabase too!

You put me on the right track though. I think the SaveFileDialog and OpenFileDialog methods might help me. These didn’t work with Mac Notes 5, but that seems to have been fixed with Mac Notes 6.

Again, both methods return a file name rather than a folder. I’ll have to see if I can work around that.

Thanks again for your help.

Cheers,

  • Mike