But Dennis allow me to publish it on my site for all the Excel/Lotus Notes users in the world.The information in this article applies to: Microsoft Excel 2000 and later. Task: Insert a pre-defined formatted range of data to be inserted as part of the bode in an outgoing e-mail.
Comments: The technique used here can also be applied for inserting charts as part of the body.
I’m currently on a project to improve the performance of a particular workbook.
VBA code : Public Declare Function Find Window Lib "user32" Alias "Find Window A" _ (By Val lp Class Name As String, By Val lp Window Name As String) As Long Sub Send_Formatted_Range_Data() Dim o Work Space As Object, o UIDoc As Object Dim rn Body As Range Dim ln Ret Val As Long Const st To As String = "[email protected]" Const st CC As String = "Lotus [email protected]" Const st Body As String = vb Cr Lf & "As per agreement." & vb Cr Lf _ & "Kind regards" & vb Cr Lf & "Dennis" Const st Subject As String = "Report xxx" Const st Msg As String = "An e-mail has been succesfully created and saved." . Notes UIWorkspace") On Error Resume Next Set o UIDoc = o Work Space.
Compose Document("", "mail\xldennis.nsf", "Memo") On Error Go To 0 Set o UIDoc = o Work Space.
Current Document 'If You experience any issues with the above three lines then replace it with: 'Call o UIDoc.