Q

Write a LotusScript agent to automate file attachments

Learn how to create a private, automated LotusScript agent to automate both file attachment and detachment.

I am experienced in VB6 (Visual Basic) and VBA (Visual Basic for Applications) programming. I'd like to use LotusScript to create private agents in my Lotus Notes client 6.5 to automate email file attachment and detachment processes. How can I do this?

Nothing could be easier. But first, you must be aware that the object model doesn't match the user interface (UI):

' where  doc is NotesDocument the document 
you are attaching a document to
Dim object As NotesEmbeddedObject
Dim body as NotesRichTextItem
Set body = doc.GetFirstItem("body") 
' Assume body field is garanteed to exist and 
be rich text.
' OR, IF CREATING A NEW DOC: Set rtitem = 
New NotesRichTextItem( doc, "Body" )
Set object = rtitem.EmbedObject
( EMBED_ATTACHMENT, "", yourFileName)

Do you have comments on this Ask the Expert Q&A? Let us know.

Related information from SearchDomino.com:

Dig Deeper on LotusScript

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

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