Attach a file from lotus script ?

Hi,

I'am looking for a sample of lotus script to attach a file (excel for instance) into a rich text field. This without use any prompt windows.

Thanks
didedeAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
wrichardConnect With a Mentor Commented:
This script creates a new document in the current database, creates a new rich text item called Body on the document, and attaches the file profile.xls to the Body. It then sets the value of the Form and Subject items on the document and saves it.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( doc, "Body" )
Set object = rtitem.EmbedObject _
( EMBED_ATTACHMENT, "", "c:\profile.xls", "Profile" )
doc.Form = "Main Topic"
doc.Subject = "Here's Jim's document, as an attachment"
Call doc.Save( True, True )

A couple more example can be found  in the script section of the help database.  Look at the Notes RichTextItem class.
0
All Courses

From novice to tech pro — start learning today.