5 pts.
 How can I copy/paste a table from Excel to Lotus Notes
Hi all, I've been reading some posts about my question over the internet but didn't find any accurate answer. Here's the problem: When I click a button in Excel, i need the table from a certain "Range" to copy/paste in the body of an e-mail that will send itself automatically. Now, I know how to build the macro to automatically send the e-mail but I can't find a way to insert the table in it. Here's the code I'm using to send the e-mail: Public Sub SendMail2() 'Tools --> references --> Microsoft Scripting runtime 'Variables Dim EMailSendTo As Variant Dim EMailCCTo As Variant Dim EMailBCCTo As Variant Dim EmailSubject As String Dim rnBody As Range On Error Resume Next 'Recipients EMailSendTo = VBA.Array("recipient@bbb.com") EMailCCTo = VBA.Array("") EMailBCCTo = VBA.Array("") EmailSubject = "TEST" Set objNotesSession = CreateObject("Notes.NotesSession") Set objNotesMailFile = objNotesSession.GETDATABASE("", "") objNotesMailFile.OPENMAIL Set objNotesDocument = objNotesMailFile.CREATEDOCUMENT Set objNotesField = objNotesDocument.APPENDITEMVALUE("Subject", EmailSubject) Set objNotesField = objNotesDocument.CREATERICHTEXTITEM("Body") objNotesField.APPENDTEXT "" & vbCr Set objNotesField = objNotesDocument.APPENDITEMVALUE("SendTo", EMailSendTo) Set objNotesField = objNotesDocument.APPENDITEMVALUE("CopyTo", EMailCCTo) Set objNotesField = objNotesDocument.APPENDITEMVALUE("BlindCopyTo", EMailBCCTo) objNotesDocument.send (0) Set objNotesSession = Nothing Set objNotesSession = Nothing Set objNotesMailFile = Nothing Set objNotesDocument = Nothing Set objNotesField = Nothing End Sub I read somewhere that you can use this code: Range([b5], [b65536].End(3)).CopyPicture Call UIdoc.GotoField("Body") 'Blah blah blah Call UIdoc.Paste But I don't know how to adapt the code for my problem. The fact is, I've just started to write macros and the code I'm using for the e-mail isn't from me, I have just adapted it for my problem. If you guys could help me, that would be really appreciated! Thanks in advance guys.

Software/Hardware used:
Excel, Lotus notes
ASKED: February 4, 2013  4:11 PM
UPDATED: February 4, 2013  4:21 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. Michael Tidmarsh   11,400 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _