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)
Dig deeper on Domino Resources - Part 2
Related Q&A from Brian Mahoney
Find out what types of calculations can be computed for a column in a Lotus Notes view and the best way to go about it with this expert response.continue reading
Find out why you can't use Formula language to include a doclink to a specific Lotus Notes view or database and need to use LotusScript instead.continue reading
Discover the reasons behind a Notes/Domino admistrator having trouble with disabled options in the "customize this view" section of his Lotus Notes ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.