Satish.digit
Member
Hi,
I wrote a macro for sending mails from excel sheet as attachment.
below is the code:
Sub Mail_workbook_1()
Dim wb As Workbook
Dim I As Long
Set wb = ActiveWorkbook
If Val(Application.Version) >= 12 Then
If wb.FileFormat = 51 And wb.HasVBProject = True Then
MsgBox "There is VBA code in this xlsx file, there will be no VBA code in the file you send." & vbNewLine & _
"Save the file first as xlsm and then try the macro again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
For I = 1 To 3
wb.SendMail Worksheets("Start").Range("e39").Value, _
"Voice of Customer 2012!"
If Err.Number = 0 Then Exit For
Next I
On Error GoTo 0
End Sub
Problem: this macro is working in OutLook only. But i need this to work in any mail like Lotus etc.,
Please help me on this.
Regards,
Kumar.
I wrote a macro for sending mails from excel sheet as attachment.
below is the code:
Sub Mail_workbook_1()
Dim wb As Workbook
Dim I As Long
Set wb = ActiveWorkbook
If Val(Application.Version) >= 12 Then
If wb.FileFormat = 51 And wb.HasVBProject = True Then
MsgBox "There is VBA code in this xlsx file, there will be no VBA code in the file you send." & vbNewLine & _
"Save the file first as xlsm and then try the macro again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
For I = 1 To 3
wb.SendMail Worksheets("Start").Range("e39").Value, _
"Voice of Customer 2012!"
If Err.Number = 0 Then Exit For
Next I
On Error GoTo 0
End Sub
Problem: this macro is working in OutLook only. But i need this to work in any mail like Lotus etc.,
Please help me on this.
Regards,
Kumar.