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.
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.
- Photo Credit Chad Baker/Photodisc/Getty Images
How to Add an Attachment in Lotus Notes
When you want to share a file with someone, send it in an email message as an attachment. Lotus Notes makes it...
How to Learn Lotus 1-2-3
Lotus 1-2-3 was one of the first spreadsheet programs. It was extremely popular before Microsoft Excel arrived on the market. It stills...
How to Convert Lotus Notes Email to the PDF Format
Lotus Notes is a program from IBM that is used primarily by businesses for email, calendar and instant messaging purposes, among other...
How to Send HTML Email With Images
Many popular email providers such as Microsoft's Outlook.com (previously Hotmail) provide users with a button to click that will insert an image...
How to Attach an SQL Database to a Web Page
Database-driven websites allow web developers to create a website that's both dynamic and easy to maintain. Not only does it allow for...