Sorry for another post, but I haven't gotten anywhere, but wanted to provide a little more detail:
==================================================
l_attachment="C:\windows\temp\qdms\cert.pdf"
*Create the Notes object
SESSION=CREATEOBJECT("NOTES.NOTESSESSION")
m.mailfile=SESSION.GetEnvironmentString("MailFile",.T.)
m.MailServer=SESSION.GetEnvironmentString("MailServer",.T.)
DB=SESSION.GetDatabase(M.MailServer,m.mailfile)
DOC=DB.CreateDocument()
DOC.FORM="Memo"
DOC.Subject="Certificate"
DOC.Body="Attached is Certificate No. 999 as requested"
DOC.FROM=SESSION.UserName
DOC.CreateRichTextItem("Attachment")
DOC.EmbedObject(1454, "", l_Attachment, "Attachment")
DOC.SEND(.F.,recipients)
DOC.SAVE(.T.,.T.)
================================================
The program chokes on the line in bold type....and I can't figure out for the life of me why. I have verified that the attachment file has been created and exists.
Sure could use a hand on this one - I am "this close" to finishing this module!
Thanks.
Phil Thomas
http://phillipdthomas.comNever let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....