+ Reply to Thread
Results 1 to 2 of 2

VBA - Resizing all object in powerpoint

  1. #1
    Registered User
    Join Date
    01-06-2016
    Location
    Phoenix, Arizona
    MS-Off Ver
    2010
    Posts
    2

    VBA - Resizing all object in powerpoint

    The following code allows me to take all worksheets in a workbook and create a PowerPoint presentation automatically. The problem I am running into is adding the instructions to make every image in every slide 540 tall by 960 wide and then center each object in its respective slide. Last hurdle requires the help of the community. Thank you in advance.

    Sub CopyToPowerPoint()
    Dim pptApp As New PowerPoint.Application
    Dim pptPre As PowerPoint.Presentation
    Dim pptSld As PowerPoint.Slide
    Dim objSheet As Excel.Worksheet
    Dim pptShape As PowerPoint.Shape

    pptApp.Visible = msoTrue

    Set pptPre = pptApp.Presentations.Add

    For Each objSheet In ThisWorkbook.Worksheets

    objSheet.Range("Print_Area").Copy 'Picture Appearance:=xlScreen, Format:=xlPicture

    Set pptSld = pptPre.Slides.Add(pptPre.Slides.Count + 1, ppLayoutBlank)

    pptSld.Shapes.PasteSpecial ppPasteEnhancedMetafile
    Set pptShape = pptSld.Shapes(1)

    Next

    End Sub

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: VBA - Resizing all object in powerpoint

    Maybe this snippet of code will help. MyTop, MyLeft, etc. are in inches. What I do is copy the object onto the powerpoint slide and resize and position it to where I want it and then right click it to get its position and size.

    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Resizing Excel Chart in Powerpoint v.2013
    By jeversf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2015, 02:40 AM
  2. [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
  3. Powerpoint PPSX Object in Excel
    By beickholt in forum Excel General
    Replies: 0
    Last Post: 07-03-2012, 02:49 PM
  4. Calendar object not resizing when zoom in/out
    By ynknoz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-11-2009, 01:02 AM
  5. PowerPoint Object in Excel Macro
    By SmartS.101 in forum Excel General
    Replies: 6
    Last Post: 07-30-2009, 09:29 AM
  6. [SOLVED] Link to powerpoint resizing graphs
    By Landxlii in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-06-2005, 04:06 PM
  7. Importing Excel Object in Powerpoint
    By technically challanged in forum Excel General
    Replies: 0
    Last Post: 01-31-2005, 06:06 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