How can I copy/paste a table from Excel to Lotus Notes

5 pts.
Tags:
Lotus Notes
Microsoft Excel
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

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following