+ Reply to Thread
Results 1 to 10 of 10

Data Bars of Conditional formatting not copying over correctly into body of HTML email

  1. #1
    Registered User
    Join Date
    03-13-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    19

    Data Bars of Conditional formatting not copying over correctly into body of HTML email

    Hi all,

    I've spent a lot of time trying to figure this out but without any success. It's really getting me frustrated and down

    I'm using Ron de Bruins' VBA code to send an email of a range of cells that have Data Bars (Conditional Formatting) in them. But with this code all the cell contents and formats seems to be exported to Outlook but not databars.

    Can someone PLEASE help me figure this one out!?

    I'm using Excel 2010 and Outlook 2010

    Thanks everyone!

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email

    Make sure the data bars are in cells that excel considers to be in the used range, or the range you specify to be captured.

    If you still have a problem then you need to provide example of code and workbook used.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    03-13-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email

    Andy , am using 'ActiveSheet.UsedRange' in my code.Below is my code.I have also attached my worksheet.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by astha.malik1; 03-17-2014 at 07:45 AM.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    You will need to send the range as an image to include the CF databars.
    http://www.rondebruin.nl/win/s1/outlook/amail7.htm

  5. #5
    Registered User
    Join Date
    03-13-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email

    Sorry for missing this , I am a newbie..I have made this correction.

    Andy ,In the link you have shared , the image is added as an attachment to e-mail.I want the entire cell text including the CF databars to come in e-mail body.Please help.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email

    You can't. The databars are not actual cell content that you can create with html.
    If you really wanted to include the cell shading as part of the table within an email then you would need to use a formula to fake the bar.

    Something like the attached.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-13-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email

    Thanks Andy .How can we paste the entire used range of the worksheet as an Image in e-mail?
    I think that might also solve my problem.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email


  9. #9
    Registered User
    Join Date
    03-13-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email

    Managed to write this code , to copy and paste the cell range as image.But somehow it gives me a 'Permission Denied' error at
    ActiveSheet.ChartObjects("EXPORT").Chart.Export "C:\SavedRange.jpg" .

    Can you please help.

    Please Login or Register  to view this content.
    Last edited by astha.malik1; 03-17-2014 at 01:58 PM.

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Data Bars of Conditional formatting not copying over correctly into body of HTML email

    Why did you change the output folder location from your default temporary folder to the root directory?
    You probably don't have permission to save files to the root folder.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Conditional formatting not copying over correctly into body of HTML email
    By seaottr in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 04-10-2017, 01:01 PM
  2. [SOLVED] Data Bars in Conditional Format are not displaying % from 0-100 correctly in the cell
    By maldoncn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2013, 02:17 AM
  3. Paste Conditional formatting into Outlook email body
    By tabkaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2013, 07:58 PM
  4. Encode Text Of Body Of Email Into HTML
    By WJO in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2012, 02:27 PM
  5. Excel macro to send HTML Body email
    By Benjamin2008 in forum Excel General
    Replies: 1
    Last Post: 05-01-2010, 05:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1