I am trying to send an email from Excel using Lotus Notes. My code at the moment stands as:
Dim MyDate, MyStr
MyDate = Date
MyStr = Format(Date, "Short Date")
MyStr = Format(MyDate, "dd-mm-yy")
emailsubject = UserForm1.TextBox2.Value & " Sales Stats " & MyStr
emailrecipient = UserForm1.TextBox2.Value
fdir = "C:\WINDOWS\DESKTOP\"
fname = emailrecipient & " " & MyStr
If emailrecipient = "" Then
MsgBox ("Your email failed to send, please ensure you have completed all details correctly")
If Application.MailSystem <> xlNoMailSystem And emailrecipient <> "" Then
Worksheets("Parsed And Sorted Sales List").Select
.Range("C1").AutoFilter Field:=3, Criteria1:=UserForm1.TextBox2.Value
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
ChDir "C:\WINDOWS\DESKTOP\Backup Of Stats\"
.SaveAs Filename:=fdir & emailrecipient & MyStr
.SendMail Recipients:="Robert Cunningham", Subject:=emailsubject
MsgBox "You must specify a valid e-mail address in order to send the sheet via e-mail."
I previously used Groupwise as my default e-mail client and this worked OK - is there a problem with the above code which will not allow Lotus to send?
Does anyone know a workaround which perhaps focuses on Lotus Notes application and then sends the e-mail.
I am completely lost!!!