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:
Other People Are Reading
Click "Start" in Windows and then click "LotusScript Editor."
Enter the following code in the open window to attach the "test.txt" document to the Notes database:
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)
Click "File" and then click "Save" to apply the change to the Notes database.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for