+ Reply to Thread
Results 1 to 6 of 6

Selected Excel Range to Power Point Kinda...

Hybrid View

  1. #1
    Registered User
    Join Date
    09-23-2008
    Location
    Yokosuka Japan
    Posts
    44

    Excel to PPT...

    Leith,

    Thanks for your help on this, I will check back again.

    Best Regards,

    BusDriver2

  2. #2
    Registered User
    Join Date
    09-23-2008
    Location
    Yokosuka Japan
    Posts
    44

    From Excel Power Point

    Hi Leith,

    I haven't heard back from you on the last post so I searched the internet and found a few macros that I was able to sew together and then make it work for my needs. Part of it the macro was authored by A. Pope and the other part was authored by Mr. Peltier.

    This is the procedure that worked for me, Copy and paste the first macro in to Excel.

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _
    ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
     
    Private Const KEYEVENTF_KEYUP = &H2
    Private Const VK_SNAPSHOT = &H2C
    Private Const VK_MENU = &H12
    
    Sub FrankenMacro()
    ' Do not forget to set a VBE reference to Microsoft PowerPoint Object Library
    ' This Macro is to be installed in EXCEL
    
    Dim PPApp As PowerPoint.Application
    Dim PPPres As PowerPoint.Presentation
    Dim PPSlide As PowerPoint.Slide
        
        keybd_event VK_SNAPSHOT, 1, 0, 0
        DoEvents
        Set PPApp = GetObject(, "Powerpoint.Application")
        Set PPPres = PPApp.ActivePresentation
        
        PPApp.ActiveWindow.ViewType = ppViewSlide
        Set PPSlide = PPPres.Slides(PPApp.ActiveWindow.Selection.SlideRange.SlideIndex)
        PPSlide.Shapes.Paste.Select
        Set PPSlide = Nothing
        
        Set PPPres = Nothing
        Set PPApp = Nothing
    
    End Sub

    Then launch Power Point and copy and paste this macro in to Power Point.


    Sub ResizeFrankenMacro()
    
    ' This macro has to be installed in POWER POINT
    ' Remeber to change the security settings allowing macros to "Play"
    ' On the Toolbar, Right Click, Customize, scroll down, Macros, Drag UP to your toolbar
    
        ActiveWindow.Selection.ShapeRange.PictureFormat.CropLeft = 71.99
        ActiveWindow.Selection.ShapeRange.PictureFormat.CropRight = 239.98
        With ActiveWindow.Selection.ShapeRange
            .IncrementLeft 18#
            .IncrementTop 44.25
        End With
        ActiveWindow.Selection.ShapeRange.PictureFormat.CropTop = 83.99
        With ActiveWindow.Selection.ShapeRange
            .IncrementLeft 30#
            .IncrementTop -192#
        End With
        ActiveWindow.Selection.ShapeRange.PictureFormat.CropBottom = 70.49
        With ActiveWindow.Selection.ShapeRange
            .IncrementLeft -36#
            .IncrementTop 126#
        End With
        With ActiveWindow.Selection.ShapeRange
            .ScaleWidth 1.1, msoFalse, msoScaleFromTopLeft
            .ScaleHeight 1.1, msoFalse, msoScaleFromTopLeft
        End With
        ActiveWindow.Selection.Unselect
    End Sub

    Once these macros are installed... both Excel and Power Point must be active/open... from Excel execute the macro, it will take a Screen Capture of the active window and paste it in to Power Point... from Power Point execute that macro and it should trim/crop it to the size of the slide.

    Best Regards,

    This forum is the BEST... BusDriver2

+ 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. Excel VBA - Range variable
    By Davew01 in forum Excel General
    Replies: 5
    Last Post: 02-16-2012, 06:24 AM
  2. Excel 2003 PivotTable Range Changed in SharePoint 2007
    By jmigliaro in forum Excel General
    Replies: 0
    Last Post: 07-17-2008, 10:22 AM
  3. Locked as a cross post >> naming a selected range
    By PMTREVISAN in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2007, 03:51 PM
  4. transpose a selected range and have the Link pasted
    By d888nc in forum Excel General
    Replies: 1
    Last Post: 11-10-2006, 03:08 AM
  5. Copy a selected range of data
    By SeyyaH in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-11-2006, 07:51 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