Q
Problem solve Get help with specific problems with your technologies, process and projects.

Attach through LotusScript without having to detach and reattach

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

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close