Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Let user choose mail recipient via lotus notes automatio
Message
De
17/07/2001 03:23:59
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00530991
Message ID:
00531396
Vues:
18
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform