Consulting

Results 1 to 7 of 7

Thread: Need quick help with some VBA issues (image sizing)

  1. #1

    Need quick help with some VBA issues (image sizing)

    Hopefully you guru's can help me on this one. I am making a macro in excel to export a image created by excel into powerpoint, and then have it save as a .png image.

    I have the macro fully functional.. But the .png image. The image size I am getting is 720x540 and I was really hoping for a higher res image. This is what I have:

    'Save as .png file
    For Each sld In pwPnt.ActivePresentation.Slides
    Call sld.Export(SavePathCell & "7-Day_Forecast-Extended-Outlook.png", "PNG")
    Next

    'Archive .png file
    For Each sld In pwPnt.ActivePresentation.Slides
    Call sld.Export(SavePathCell2 & SaveNameCell & " - " & Format(Now(), "yyyymmdd") & " - " & Format(Now(), ("hhmm - ")) & opinit & ".png", "PNG")
    Next




    Thanks so much for your help!!!

  2. #2
    VBAX Mentor
    Joined
    Feb 2009
    Posts
    493
    Location
    Just to clarify is your request in the end just to convert images to png? Or is there more to it?

  3. #3
    It already converts it... I just want to make the file bigger than 720x540

    The image is going to be blown up, and it distorts really bad at 720x540.

    So I am trying to solve this issue.

  4. #4
    I tried switching to .gif and .bmp with the same results... ideas?

  5. #5
    VBAX Mentor
    Joined
    Feb 2009
    Posts
    493
    Location
    If you blow up the original that is on excel does it distort badly also? How is the image being created in excel? Could you upload an example?

  6. #6
    No it does not... This is the image that is being converted... It is plenty big.
    Attached Files Attached Files

  7. #7
    VBAX Mentor
    Joined
    Feb 2009
    Posts
    493
    Location
    Are you only using powerpoint for its save as image feature?

    If so I found code to export a range to a picture http://www.xcelfiles.com/VB_Quick17.html which might once modified be much better for you.

    I tested this and it looks good. The output of my test is attached.
    Attached Files Attached Files

Posting Permissions

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