When attaching a PDF file from Adobe to Lotus Notes, how do I make the subject of my email and the attachment title the same?
Software/Hardware used:
Lotus Notes, Adobe Acrobat Pro, Microsoft Office 2007
ASKED:
March 16, 2010 9:56 PM
UPDATED:
April 8, 2010 9:45 PM
A solution would be to create an action that will run an agent coded in Lotus Script.
This script will see attachement name and report it to the “Subject” field of the memo in the NotesUIDocument class….
I’m afraid it will be expensive to code for the poor result …
Couldn’t the user create a smart icon button with @formula to grab the atttachment names, assign the attachment name as the subject, if there is only on attachment, or present a list of attachment names if there are more than one? As a smart icon, it would be available to any form in custom apps as well. Therefore, might want to check that Subject is an abailable field first. I’ll post the steps and code if someone wants to try it.
I coded a formula button. To add Add a custom button to your workspace with this code. Use it from any Notes document. It stops evaluation if the current document has no Subject fieild or the document has no attachments. It assigns the attachment name to the subject if there is only on attachment. It prompts you to pick the attachment name you want in the Subject if there is more than one attachment. Don’t know if that’s what you wanted, but it is one way to do it.
@if(!@isavailable(Subject);
@Do(
@Prompt([ok];”No Subject Field” ; “The current document does not have a Subject field.”) ; @return(0)); “”);
varNames := @AttachmentNames;
@If(VarNames = “”;
@Do(
@Prompt([Ok];”No Attachments”; “There no attachments on this document. Please add an attachment and try again”);
@Return(0)
);
“”);
varSubject := @If(
@Elements(varNames ) = 1; varNames ;
@Prompt([OkCancelList];”Choose Attachment Name”; “Choose attachment name to assign to Subject”; “”; varNames));
@SetField(“Subject”; varSubject)