![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
I need to copy and paste a worksheet into lotus notes I can do this manually but has anyone got any extra code to do this I have code for sending attachments so I just need the extra code to put it into the message body.
|
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
When you say a worsheet do you mean every cell? Could be huge...
Have you tried using a range? I haven't, the following will work, but you'd hate to write it 16,777,216 times (I wouldn't like that very much): BodyText = Range("a6") & Chr(13) & Range("a7") & Chr(13) & Range("a8") MailDoc.Body = BodyText |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
Yeah I want to specify a range
a1:k59 any ideas |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
I don't have Lotus notes @ home....will
need to search for the CoMS syntax to get a sheet Obj embedded in Notes.... Let me have a look.... |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
Thanks Ivan
Nice pic of the sky tower!> |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Jade stadium...when the Crusaders take out the brumbies....then Next year when the All Blacks (Crusaders World Cup.... |
|
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
yeah if I had a current pic of Jade that would be cool im gearing up for this weekends final will be an excellent game!
_________________ [ This Message was edited by: brettvba on 2002-05-20 20:30 ] |
|
|
|
|
|
#8 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Alright better late never (yes-no?). Need an array to pull this off. Add the following declarations:
Dim myAr() As String, cell As Range, cnt As Integer, bodytext As String Now add/replace the following code:
Change the sheet name in the array stack. The 2nd loop is to stack a string with the individual array items so that your message doesn't have a bunch of ";"s throughout. Also, with the code your using make the following adjustment: MailDoc.SAVEMESSAGEONSEND = True If you want to save the outgoing mail. You can array and string multiple recipients, cc's and bcc's the same way. Just use "," instead of " " when you're stacking the string. Hope this helps. _________________ Cheers, Nate Oliver ![]() [ This Message was edited by: NateO on 2002-07-09 13:09 ] |
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
cHEERS Nate I knew you would come through eventually......I think
|
|
|
|
|
|
#10 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Damn, you saw this too quickly!
You actually don't need to array, you can just stack the string: like this: For Each cell In Sheets("Sheet1").[a1:k19] bodytext = bodytext & " " & cell.Value Next cell The nice thing is that it stacks left to right, top to bottom. So get rid of myar business (I was originally looking at this quite differently) There is the issue of borders and commonly sized strings (formatting). Haven't solved that one yet. Give me another couple of months |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|