PC Review


Reply
Thread Tools Rate Thread

Copying Cell Value AND Format into Email Body Macro

 
 
TysonE
Guest
Posts: n/a
 
      16th Sep 2011
So my current problem is that I can get the text from my sheet into
the email, but I cant get it to bring the formatting too.

Here is a portion of my current VBA code:

Sub BodyMacro(strbody, email)

Sheets("Body").Select
Range("B1") = email
Calculate

For Each cell In Sheets("Body").Range("A4:A33")
strbody = strbody & cell.Value & vbNewLine
Next

End Sub

This works exactly how I want it to other than I would like the bold,
underline, and italic text in there too. To add to the difficulty,
some of the lines of text bounce between all three. Meaning in cell
A1 its just not all bold text, it will start off bold, then go to
underline, then to regular.

I have also done the "Send to Mail Recipient" and I do not like how
the text doesn't wrap. If this can be down with it wrapping, I would
be open to that suggesting too.

Regards.
 
Reply With Quote
 
 
 
 
TysonE
Guest
Posts: n/a
 
      20th Sep 2011
Nobody has any idea on how to do this? I have seen a way with a
custom function, but I'm looking for a way to do this without a custom
solution.

Regards,

On Sep 16, 11:11*am, TysonE <tys...@gmail.com> wrote:
> So my current problem is that I can get the text from my sheet into
> the email, but I cant get it to bring the formatting too.
>
> Here is a portion of my current VBA code:
>
> Sub BodyMacro(strbody, email)
>
> * * * * Sheets("Body").Select
> * * * * Range("B1") = email
> * * * * Calculate
>
> * * * * For Each cell In Sheets("Body").Range("A4:A33")
> * * * * * * strbody = strbody & cell.Value & vbNewLine
> * * * * Next
>
> End Sub
>
> This works exactly how I want it to other than I would like the bold,
> underline, and italic text in there too. *To add to the difficulty,
> some of the lines of text bounce between all three. *Meaning in cell
> A1 its just not all bold text, it will start off bold, then go to
> underline, then to regular.
>
> I have also done the "Send to Mail Recipient" and I do not like how
> the text doesn't wrap. *If this can be down with it wrapping, I would
> be open to that suggesting too.
>
> Regards.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COPY/PASTE to body of email the format of Excell cell LetMeDoIt Microsoft Excel Programming 2 4th Aug 2008 12:39 PM
Format Body in Email matt Microsoft Outlook VBA Programming 6 18th Jul 2008 03:18 AM
Format the Body of an Email matt Microsoft Outlook Discussion 2 16th Jul 2008 05:58 PM
Format in email body =?Utf-8?B?Y2hpcGl0bw==?= Microsoft Outlook Discussion 2 15th Nov 2006 02:50 AM
Outlook 2000 - Embedded CSS Styles are lost when copying body to new email Jado Microsoft Outlook VBA Programming 0 23rd Aug 2005 09:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:45 AM.