+ Reply to Thread
Results 1 to 5 of 5

Crop Image via VBA in PowerPoint

  1. #1
    Forum Contributor G.Bregvadze's Avatar
    Join Date
    12-06-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010 - 2016
    Posts
    256

    Crop Image via VBA in PowerPoint

    Hi,

    I am using the code:

    Please Login or Register  to view this content.
    to crop the image on the slide, however it gives the possibility to crop by fixed size (10).

    Is it possible to identify via VBA by how much the picture is outside the slide area and crop the image by that size?

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

    Re: Crop Image via VBA in PowerPoint

    change slide index and shape name to suit.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor G.Bregvadze's Avatar
    Join Date
    12-06-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010 - 2016
    Posts
    256

    Re: Crop Image via VBA in PowerPoint

    Thanks for the great code, but can it be modified to include it in Excel VBA so it can be ran from Excel ?

    As I understand we need to add PowerPoint.Application.

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

    Re: Crop Image via VBA in PowerPoint

    Sure.

    I assume from the example code you posted that you already have an object referencing powerpoint, so you can just use that in the code.
    I have assumed late binding and have therefore declared the slide and shape as objects.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor G.Bregvadze's Avatar
    Join Date
    12-06-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010 - 2016
    Posts
    256

    Re: Crop Image via VBA in PowerPoint

    Thanks a lot for supporting, works great.

+ 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. Copy Image (not charts) from excel to powerpoint
    By Anum86 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2015, 06:20 AM
  2. Replies: 0
    Last Post: 05-06-2015, 04:25 AM
  3. Separate image too large in two slides powerpoint
    By lupingamon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2014, 05:27 AM
  4. [SOLVED] Insert object image of jpeg and PNG in powerpoint
    By vbvba in forum PowerPoint Formatting & General
    Replies: 1
    Last Post: 03-08-2013, 08:57 AM
  5. Macro inc. on error go to start, import image, crop image
    By DWatPerry in forum Tips and Tutorials
    Replies: 1
    Last Post: 02-29-2012, 02:38 PM
  6. Crop / move Image Macro
    By DWatPerry in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2012, 07:39 AM
  7. Excel Macro Import web image, crop, and resize.
    By jdax57 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-17-2009, 08:30 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