Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to know how to add an attachment to a louts notes email!

Status
Not open for further replies.

mbair

Programmer
Aug 13, 2003
22
US
This is my code and it works but I need to add an attachment?

Public Sub OPENNOTES(sendtext As String)
Dim LOTSESSION As Domino.NotesSession
Dim lotDocument As Domino.NotesDocument
Dim lotDatabase As Domino.NotesDatabase
Dim vRecipients As Variant
Dim AttachME As Domino.NotesRichTextItem
Dim EmbedObj As Domino.NotesEmbeddedObject
Dim strAttachment As String
strAttachment = sendtext
Set LOTSESSION = New Domino.NotesSession

With LOTSESSION
.Initialize "password" 'or u can use
'an inputbox
End With

Set lotDatabase = _
LOTSESSION.GetDbDirectory("xxx").OpenMailDatabase

With lotDatabase
If Not .IsOpen Then
.Open
End If
End With

vRecipients = Array("somename@yahoo.com", _
"somename@yahoo.com", _
"recipient@domain" _
)

Set lotDocument = lotDatabase.CreateDocument()

With lotDocument
.AppendItemValue "Form", "Memo"
.AppendItemValue "Subject", "testing"
.AppendItemValue "Body", strAttachment
.Send False, vRecipients

End With


Set lotDocument = Nothing
Set lotDatabase = Nothing
Set LOTSESSION = Nothing
End Sub
 
Us


































































I don't know much about lotus notes but usually it is by setting the attachment property

With lotDocument
.AppendItemValue "Form", "Memo"
.AppendItemValue "Subject", "testing"
.AppendItemValue "Body", strAttachment


.Attachments="C:\myfolder\myfile.xls";"C:\myfolder\someother.xls"


.Send False, vRecipients

End With












 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top