Home > Ask the Domino Experts > Questions & Answers > How can I use LotusScript to remove all attachments and save them in a specified location?
Ask The Domino Expert: Questions & Answers
EMAIL THIS

How can I use LotusScript to remove all attachments and save them in a specified location?

Hans van der Burg EXPERT RESPONSE FROM: Hans van der Burg

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site
>
QUESTION POSED ON: 19 May 2003
I am trying to use LotusScript behind a button to remove all attachments and save them in a specified location. How can I do this? I was able to locate code on another site that provided code to remove an attachment, but they're deleted when I need to save them. I would like to use this to:
  1. run against a mailbox file and strip off and save the attachments and
  2. run against the Notes directory and remove and save ID files to a specified location.
Can you help?

>
What you will need to do is to grab the attachment as an embedded object from your document using the NotesDocument class. This is done by using the method Set notesEmbeddedObject = notesDocument.GetAttachment(fileName ) from your NotesDocument.

You will then have the actual attachment stored in the notesEmbeddedObject object. This class contains the methods "ExtractFile" and "Remove." With the first one, you can save the attachment to a specified location, and then once that has been successful, use the remove option to remove the attachment from the document. Don't forget to call the Save method from the NotesDocument class to save the document without the attachment.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts