Google Groepen ondersteunt geen nieuwe Usenet-berichten of -abonnementen meer. Historische content blijft zichtbaar.

sending mail to several recipients

9 weergaven
Naar het eerste ongelezen bericht

Cris, Portugal

ongelezen,
23 apr 2003, 11:41:5323-04-2003
aan
i'm using the code to send an attach file with lotus notes, but i need
help with this:

1. how can i send the mail to several recipients?
2. when i save the full path name, i must put a .xls at the end of the
file name or else i can't open it with lotus notes (notes dosen't
recognizes the file). Is it possible to save the file as an excel
format without righting the .xls extension?


' be sure to reference the Lotus Domino Objects, domobj.tlb
Dim objNotesSession As Object
Dim objNotesDatabase As Object
Dim objNotesDocument As Object
Dim objAttachment As Object
Dim objRichText As Object
Dim FullPath As String
Dim FileName As String
Dim Msg As String

Const EMBED_ATTACHMENT = 1454

Set objNotesSession = CreateObject("Notes.Notessession")
Set objNotesDatabase = objNotesSession.GETDATABASE("", "")
Call objNotesDatabase.OpenMail 'default mail database
If objNotesDatabase.IsOpen = False Then
MsgBox "Cannot connect to Lotus Notes."
Exit Sub
End If
Set objNotesDocument = objNotesDatabase.CreateDocument
Call objNotesDocument.ReplaceItemValue("Form", "Memo")

Sheets("COMISSÕES").Select
ActiveSheet.Copy
FullPath = Application.GetSaveAsFilename

ActiveWorkbook.SaveAs FullPath
FileName = ActiveWorkbook.Name

' assemble message
Set objRichText = objNotesDocument.CreateRichTextItem("Body")
Set objAttachment = objRichText.EmbedObject(EMBED_ATTACHMENT, "",
FullPath, FileName)
Msg = "Lotus Note sent from " & objNotesSession.CommonUserName
With objNotesDocument
.Subject = "Excel Lotus Note!"
.Body = Msg
.sendto = "cristina...@gfs.pt"
.SaveMessageOnSend = True ' save in Sent folder
.send (False)
End With

Set objNotesSession = Nothing
Set objNotesDatabase = Nothing
Set objNotesDocument = Nothing
Set objAttachment = Nothing
Set objRichText = Nothing

MsgBox "Your Lotus Notes message was successfully sent"
ActiveWorkbook.Close

Nick

ongelezen,
23 apr 2003, 12:37:0123-04-2003
aan
Take a look at Ron Debruin's webpage

http://www.rondebruin.nl/sendmail.htm

>.
>

0 nieuwe berichten