Hi Larry
Thank you for your reply
I am using Notes as an Automation server..... see code below
Dim notesApp As Object '-- NOTESSESSION
Set notesApp = CreateObject("Notes.NotesSession")
Dim notesDB As Object '-- NOTESDATABASE
Set notesDB = notesApp.GETDATABASE("", "")
Dim notesDoc As Object '-- NOTESDOCUMENT
notesDB.openmail
Set notesDoc = notesDB.CREATEDOCUMENT
With notesDoc
For lnRecip = 0 To 4
lcSendTo = aSendToArray(lnRecip)
.SendTo "
bowskill_steven@jpmorgan.com"
.CopyTo = "
arbuckle_jim@jpmorgan.com"
.Subject = Trim(mailform.TextBox2.Text)
.body = Trim(mailform.editme.Text)
Dim notesAttachment As Object '-- NOTESITEM
Set notesAttachment = .CREATERICHTEXTITEM("Attachment")
notesAttachment.EMBEDOBJECT 1454, "", "filename.txt"
.SendTo = lcSendTo
.SEND False
Next
End With
Set notesDoc = Nothing
Set notesDB = Nothing
Set notesApp = Nothing
Yes I know it is written in VBA, but most of this code was plucked from A VFP
example in UT.
I can use DDE to achive what I want done..see code below, but I have real limits on the size of the text in the body, where as I can pass the code above a lot of text.
***** DDE CODE
channelNumber = Application.DDEInitiate("NOTES", "SENDMAIL")
lnDoneit = Application.DDEExecute(channelNumber, "NewMessage")
'' lnDoneit = Application.DDEExecute(channelNumber, "To ")
'' lnDoneit = Application.DDEExecute(channelNumber, "Subject ")
'' lnDoneit = Application.DDEExecute(channelNumber, "Text " & Trim(setupuser.mailtext.Value))
lnDoneit = Application.DDEExecute(channelNumber, "Send")
''lnDoneit = Application.DDETerminate(channelNumber)
Set channelNumber = Nothing
I have tried to leave out the
.SendTo "
bowskill_steven@jpmorgan.com"
.CopyTo = "
arbuckle_jim@jpmorgan.com"
In the hope that this will bring up the Address book screen of notes, as this works in the DDE version, but it does ot work here.
Any ideas, code would be most appreciated.
Once again, thanks for your time
Regards
Steven