Emailing a file automatically using LOTUS NOTES


Posted by Chris Rock on October 30, 2001 11:08 AM

I tried the macro found on Mr. Excel's front page that can send an email using Outlook, but it doesn't work using Lotus Notes.
Here's the Macro:
Sub SendIt()
Application.Dialogs(xlDialogSendMail).Show _
arg1:="rockc@us.ibm.com", _
arg2:="This goes in the subject line"
End Sub

It opens a New Memo, but it attaches a TMP file to the memo, not the XLS file I'm working on.

Anyone know how to get this to work with Lotus Notes?

Thanks!

Posted by Gerry on October 30, 2001 11:20 AM

Check your programs tab in Internet Explorer and make sure your email program is set to Notes.

Posted by Chris Rock on October 30, 2001 11:25 AM

I have - Notes is my default email program.

The problem is that the file does not attach to the email, and arg1 doesn't get put in the "TO" field of the note, like it does in Outlook.

Posted by Juan Pablo on October 30, 2001 11:49 AM

I have this macro, maybe it'll help you. I don't know how it behaves since i don't use Lotus, but...

Sub Mail()
Dim Data As Variant
Dim s As Object
Dim db As Object
Dim doc As Object
Dim r As Integer, x As Double
r = 38
Set s = CreateObject("Notes.NotesSession")
Set db = s.GetDatabase(" ", "mail\username.nsf")
Set doc = db.createdocument()
doc.form = "Memo"
doc.sendto = "becky.sonnentag@clarica.com,"
doc.Subject = "New Trade Ticket Purchase"
doc.body = "Trade ticket number " & Cells(r, 5) & " is ready for allocation" & ". " & " " & "(" & Cells(3, 5) & " " & Cells(3, 17) & ")"
Call doc.send(False)
Set nSession = Nothing
End Sub

Juan Pablo

Posted by Stuart on October 30, 2001 1:20 PM

Juan Pablo, can you provide more info?

I have tried that one myself, as I use Lotus Notes, but I cannot get the file to attach to the email message. Also, the cell references you have in the doc.body line are confusing, and don't pick up any values for me - can you clarify those for me?

Thanks
Stuart

Posted by Juan Pablo on October 30, 2001 6:36 PM

As i explained

...i'm not the creator of the macro, and also, i don't have Notes neither at home or at the office, so it's difficult for me to see what's it doing. Looking at the code i don't see anything that referes to attachments, i only provided it as a starting point where maybe you can customize it to do what you need.

Sorry,

Juan Pablo



Posted by Stephen Maher on October 31, 2001 3:36 PM

I have developed a Notes (client) database that uses ODBC to read Access / Oracle / Excel files and compile a Notes mail or stored form from the fields in the data. I did it this way because I was not able to get MS apps to communicate very well with Lotus Notes.