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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lotus Notes Email Questions

Status
Not open for further replies.

Toolman29

Technical User
Oct 14, 2008
9
US
I have used the code below before, works fine. But I have two questions:

1) In the line starting "Set EmbedObj = AttachME.EMBEDOBJECT(.......", what exactly is the 1454 and is there ever anything that could be populated in the item after 1454? Each time I've see this code it's always "...(1454,"",....).

2) Is it possible to rename the attachment you are passing without creating a new file. In otherwords, the example below the attachment being pulled in is name '1.pdf', but when I send the email I want the file name to be xyz.pdf. Is this possible?


Set nosession = CreateObject("Notes.NotesSession")
Set noDatabase = nosession.GETDATABASE("", "")
If noDatabase.IsOpen = False Then noDatabase.OPENMAIL
Set noDocument = noDatabase.CreateDocument

With noDocument
.Form = "Memo"
.SendTo = "xxx@xxx.com"
.Subject = "Test Subject"
.SaveMessageOnSend = True
.PostedDate = Now()
Set AttachME = .CREATERICHTEXTITEM("Attachment")
Set EmbedObj = AttachME.EMBEDOBJECT(1454, "", 1.pdf, "Attachment")
.Send 0
End With

Set nosession = Nothing
Set noDatabase = Nothing
Set noDocument = Nothing
Set EmbedObj = Nothing
Set AttachME = Nothing
 

Part and Inventory Search

Sponsor

Back
Top