+ Reply to Thread
Results 1 to 7 of 7

Convert all charts to pictures

  1. #1
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Convert all charts to pictures

    Hello,

    I have a worksheet with multiple charts.
    I wish to convert all of them to pictures.

    I tried the following code.
    My problem is that I get all the pictures in the same place and not in the original chart place.

    Please Login or Register  to view this content.
    Can you help me ?

    Thank you for your help

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Convert all charts to pictures

    I tested your code with excel 2010, it works very well, it put image in the same place of graph
    If solved remember to mark Thread as solved

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

    Re: Convert all charts to pictures

    Code works as expected.

    Can you opst workbook example to demonstrate non working picture placement.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: Convert all charts to pictures

    Hello,

    Thank you for your support. It was not easy to solve it.

    I tried the code on a new sheet (as you did) and it worked as expected.

    I had to do 2 modifications to the module:
    1. My original sheet was 'right to left' direction. I had to modify the sheet direction to 'left to right' before the copy-paste process and change it back after that.
    2. I had to change "With .Shapes(.Shapes.Count)" to "With .Pictures(.Pictures.Count)" (I do not understand why it did not work with shapes).

    Thank you for your help

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Convert all charts to pictures

    maybe excel 2003 does not support shapes

  6. #6
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: Convert all charts to pictures

    Hello,

    I am using Excel 2010.
    The .left property value of the charts is ~87000 (when the sheet direction is right to left and the chart is on C column).
    I think that there are more issues of modifying charts & sheet direction.

    Thank you

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

    Re: Convert all charts to pictures

    Looks like a definite difference/bug between versions.

    This returns the expected value.
    Please Login or Register  to view this content.
    and you can use the property Activesheet.DisplayRightToLeft to check direction.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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