+ Reply to Thread
Results 1 to 10 of 10

Saving ranges as Bitmaps

  1. #1
    Registered User
    Join Date
    05-23-2018
    Location
    Texas, United States
    MS-Off Ver
    2013
    Posts
    29

    Saving ranges as Bitmaps

    I have been using the following method to save ranges as bitmaps so that they can then be inserted into outlook emails:

    Sub createBMP2()

    Set Plage = ActiveSheet.Range("A1:A5") 'change range to suit...or use other method to gather
    Plage.CopyPicture

    With ActiveSheet.ChartObjects.Add(Plage.Left, Plage.Top, Plage.Width, Plage.Height)
    .Activate
    .Chart.Paste
    .Chart.Export "C:\myfile.bmp", "bmp" 'change directory/filename as required
    .Delete
    End With

    Set Plage = Nothing

    End Sub


    The only issue is that the images are slightly blurry, as compared to if I just copied a range and pasted it into Outlook. Does anyone know of a solution to this issue? Or is there another method I can use to copy ranges in VBA and paste them into Outlook (several images in a single email)?

    Thanks

    Also thank you to humdingaling for providing the original code in this thread: https://www.excelforum.com/excel-pro...using-vba.html
    Last edited by jakegordon97; 02-07-2020 at 01:04 PM.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    1,831

    Re: Saving ranges as Bitmaps

    Try:

    Please Login or Register  to view this content.
    I do not know is that help, but it worth to try.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    05-23-2018
    Location
    Texas, United States
    MS-Off Ver
    2013
    Posts
    29

    Re: Saving ranges as Bitmaps

    I've tried that but I don't know how to paste it into Outlook. And I have tried that for this method, and the image either looks the same or doesn't work at all.

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    1,831

    Re: Saving ranges as Bitmaps

    I've found alternative method:

    First pasting into PoerPoint in EMF format then from there into outlook:

    Please Login or Register  to view this content.
    standard method:

    Please Login or Register  to view this content.


    there are difference:
    Capture.JPG

  5. #5
    Registered User
    Join Date
    05-23-2018
    Location
    Texas, United States
    MS-Off Ver
    2013
    Posts
    29

    Re: Saving ranges as Bitmaps

    No luck; and the ones you sent have the same blur that my method does that I am trying to correct.

  6. #6
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    1,408

    Re: Saving ranges as Bitmaps

    Possibly...
    Please Login or Register  to view this content.
    ____________________________________________________________
    If I've been helpful, let me know. If I haven't, let me know that too.

  7. #7
    Registered User
    Join Date
    05-23-2018
    Location
    Texas, United States
    MS-Off Ver
    2013
    Posts
    29

    Re: Saving ranges as Bitmaps

    That's kind of helpful, but I need to insert multiple ranges into an email as separate pictures, so if someone knows how to make my bitmap images less blurry, please let me know.

  8. #8
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    1,408

    Re: Saving ranges as Bitmaps

    You could add to the ranges...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    05-23-2018
    Location
    Texas, United States
    MS-Off Ver
    2013
    Posts
    29

    Re: Saving ranges as Bitmaps

    I figured it out. Apparently if you zoom in a lot the images become clearer when you paste them into Outlook. Thanks for the help!

  10. #10
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    1,408

    Re: Saving ranges as Bitmaps

    Good to know!

+ 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. VBA to export excel charts as bitmaps into Power Point
    By marcinpec in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2018, 11:39 AM
  2. Generating charts and saving them as bitmaps in bulk
    By Sanglorian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2014, 04:58 AM
  3. [SOLVED] Pasting multiple ranges as Bitmaps into Word + Editing them
    By jmfenn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 04:31 PM
  4. [SOLVED] Default Transparent color for bitmaps on cmd buttons
    By Abraham.Olson@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2006, 10:30 AM
  5. sending bitmaps through Lotus notes
    By rogedavi@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-01-2006, 04:55 AM
  6. [SOLVED] Download Source for Bar Chart Bitmaps?
    By Mitch Powell in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-21-2005, 04:05 PM
  7. [SOLVED] Bitmaps in custom toolbars look awful...
    By bradley.vernon@itt.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2005, 04:05 PM

Tags for this Thread

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