Home > Ask the Domino Experts > Lotus Instant Messaging/Sametime Questions & Answers > Extracting and reattaching attachments
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Extracting and reattaching attachments

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


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


>
QUESTION POSED ON: 15 September 2003
My problem is like the one in this Ask the Expert question, but a bit different. In many documents I have more than one attachment and I don't necessarily know the names in advance. My project is to extract these attachments, save them and reattach them in another field. Can you help me solve my problem?

>
EXPERT RESPONSE
You can find out the name of the attachments using standard functions of Domino. Using @Functions, you can use the function @AttachmentNames, which will give you a list of attachment names for the attachments in the current document.

I have added a LotusScript example below, which will guide you in the proper direction. Using the EmbeddedObjects property of the Notes document or Rich Text item, you get a list of embedded objects in your document (i.e., attachments). Then, by using the GetAttachment method, you get a handle to an attachment, which is stored in the class type of NotesEmbeddedObject. This class has properties such as Remove, ExtractFile etc.

Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim object As NotesEmbeddedObject
Set db = New NotesDatabase
( "server", "db" )
Set view = db.GetView( "viewname" )
Set doc = view.GetLastDocument
Forall o In doc.EmbeddedObjects
  Set object = doc.GetAttachment( o )
Call notesEmbeddedObject.ExtractFile
( "path to save file to" )
Call notesEmbeddedObject.Remove
End Forall


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


RELATED CONTENT
Lotus Instant Messaging/Sametime
How to enable communication between multiple Lotus Sametime servers
Lotus Sametime users with different 'home' servers cannot see each other online
Resources for deploying Lotus Sametime on the Internet
No one can see Lotus Sametime user is online
Meeting windows won't appear on Sametime 7 with Sametime Connect 3 client
Saving and archiving Lotus Sametime Web conferences
Collaborating with clients who don't have Sametime
Unable to log into Sametime through Notes with SSO
Can Lotus Notes leverage domain authentication?
Updating local location documents for Sametime users

LotusScript
Extracting attachments from a Lotus Notes rich-text field
Programmatically replace the design of Lotus Notes databases
Reading a binary field in an Oracle database with LotusScript
LotusScript equivalent of @Picklist for Lotus Notes
Launch large attachments within an email from a Notes database
How to find files on a hard drive or mapped network with LotusScript
Update the ACL from the Roles view with LotusScript
LotusScript agent moves tagged spam email to junk mail folder
Set a value in a field existing in another Lotus Notes database
Create an automatic scheduled view export in Excel

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

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




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