How to Attach Documents With LotusScript

Written by alexander gokhfeld
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Attach Documents With LotusScript
LotusScript allows users to attach files to Notes documents. (Chad Baker/Photodisc/Getty Images)

The LotusScript language provide users with the tools to select, update and modify Lotus Notes databases. You can use the LotusScript program to attach a file to a Notes document that you edit by adding embed objects to your Notes database. LotusScript supports a wide variety of data types that you can include in the Notes documents, such as texts, spreadsheets and database reports. By attaching a file to the Notes document, you can use data from different user sources in your Lotus Notes application.

Skill level:
Easy

Other People Are Reading

Instructions

  1. 1

    Click "Start" in Windows and then click "LotusScript Editor."

  2. 2

    Enter the following code in the open window to attach the "test.txt" document to the Notes database:

    Sub Initialize

    Dim ses As New NotesSession

    Dim dB As NotesDatabase

    Dim collection As NotesDocumentCollection

    Dim doc As NotesDocument

    Dim rtitem As Variant

    Dim object As NotesEmbeddedObject

    Set dB = ses.CurrentDatabase

    Set collection = db.AllDocuments

    Set doc = collection.GetFirstDocument

    Set rtitem = doc.GetFirstItem("Body")

    Call rtitem.EmbedObject(EMBED_ATTACHMENT, "", "test.txt")

    Call doc.Save(True, True)

    End Sub

  3. 3

    Click "File" and then click "Save" to apply the change to the Notes database.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.