Hi Dan,
Try something like:
#DEFINE EMBED_ATTACHMENT 1454
oSession = createobject("Notes.NotesSession")
oDB = oSession.GetDatabase("","Test.nsf")
oDoc = oDB.CreateDocument()
oDoc.Form = "Memo"
oDoc.SendTo = "
Somebody@somewhere.com"
oRTItem = oDoc.CreateRichTextItem("Body")
oRTItem.EmbedObject(EMBED_ATTACHMENT,"","C:\Spreadsheet.XLS","DisplayName")
oDoc.Send(0)
The oSession creation will launch Notes in a visible window. The "" parameter for GetDatabase uses the current PC. If you know the Notes server name (e.g. NOTESSERVER1), plug that in.
HTH,
Larry
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao