Home > Ask the Domino Experts > Questions & Answers > Attach through LotusScript without having to detach and reattach
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Attach through LotusScript without having to detach and reattach

Brian Mahoney EXPERT RESPONSE FROM: Brian Mahoney

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site
>
QUESTION POSED ON: 22 May 2001
How do I attach an attachment through LotusScript without having to detach and reattach on to another form? I got the object but I need to put it on another form, hopefully without detach and reattach.

>

The EmbedObject Method of the NotesRichtext class allows you to create attachments and other embedded objects. However, it doesn't let you move one from one document to another. We use code below to copy a file from an e-mail to a new document. I would also add a shell commend to delete the detached file once created.

Set rtiFile = doc.GetFirstItem("$File")
Set embobjReport = doc.GetAttachment(rtiFile.Values(0))
strFilePath = Environ("temp") & ""
strFileName = doc.Subject(0) & " " & "." & Right(embobjReport.Name, 3)
Call embobjReport.ExtractFile(strFilePath & strFileName)
Call rtiBody.EmbedObject(EMBED_ATTACHMENT, "", strFilePath &
strFileName,
strFileName)


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 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts