Ask the Expert

Indicate in an e-mail where an attachment was saved

I was asked this question and I am not certain this is possible:
Is there a way to click on a button, detach an attachment, then within the body of the e-mail it would indicate where the attachment was saved?

Examples:
{detached "TAS Office Directory 03-08002.doc" to: "C:Documents and Settingsrandy smithmy ducumnetshrTAS dir.doc"}

{detached "TAS Office Directory 03-08002.doc" to: "C:Documents and Settingsrandy smithmy ducumnetshrTAS Office Directory 03-08002.doc"}

{deleted: "TAS Office Directory 03-08002.doc"}


Sure, you would need to get a handle to the NotesEmbeddedObject, then call the extractFile method, and supply a path and filename for the file. (You could maybe save the path in a control document and/or use a combination of control docs and user prompts to get the path and filename). Now that you've saved the file (using the extractFile method), you can then call it's .Remove method to delete it from the document. Now you'll remember that we got a filename and path from the user in step 2, you can simply use the NotesRichText object's methods to put this text out into the rich text field where you stripped the file from in the first place.. voila, no more attachment and a reference to where on the filesystem it resides. Think about this, though. If the note is viewed by another, they might see a reference to a filepath and name that doesn't necessarily exist on their system. You could alternately think about using another Lotus Notes database as a storage repository for these detached files. You could then create a new document every time you detach one of the files and include a link to the new document (that lives in the repository) in your old document after you delete it. Just a thought because that way all users who have access to the repository DB will have access to the detached file.

This was first published in April 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: