+ Reply to Thread
Results 1 to 3 of 3

Converting linked excel tables to PP pictures - positioning issue - help!

  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    Kent
    MS-Off Ver
    Office 365 - Excel
    Posts
    15

    Converting linked excel tables to PP pictures - positioning issue - help!

    Hi, I am currently looking to use the following to convert linked excel tables to pictures in powerpoint which works well however it doesn't seem to delete the previous tables or position the new ones in the provious locations.

    Can anyone tell me what the problem in the code is? sorry I am new to VBA!!!

    Many thanks

    Jamie

    Sub ConvertAllShapesToPic()
    Dim oSl As Slide
    Dim oSh As Shape

    On Error Resume Next

    For Each oSl In ActivePresentation.Slides
    For Each oSh In oSl.Shapes
    ' modify the following depending on what you want to
    ' convert
    Select Case oSh.Type
    Case msoEmbeddedOLEObject, msoLinkedOLEObject
    ConvertShapeToPic oSh
    Case Else
    End Select


    Next
    Next

    NormalExit:
    Exit Sub

    ErrorHandler:
    Resume Next

    End Sub

    Sub ConvertShapeToPic(ByRef oSh As Shape)
    Dim oNewSh As Shape
    Dim oSl As Slide

    Set oSl = oSh.Parent
    oSh.Copy
    Set oNewSh = oSl.Shapes.PasteSpecial(ppPasteEnhancedMetafile)(1)
    oSh.PickupAnimation
    oNewSh.ApplyAnimation
    With oNewSh
    .Left = oSh.Left
    .Top = oSh.Top
    Do
    .ZOrder (msoSendBackward)
    Loop Until .ZOrderPosition = .ZOrderPosition
    .AnimationSettings.AnimationOrder = oSh.AnimationSettings.AnimationOrder
    End With
    oSh.Delete

    NormalExit:
    Exit Sub

    ErrorHandler:
    Resume Next

    End Sub

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    1,888

    Re: Converting linked excel tables to PP pictures - positioning issue - help!

    Yes, you are new to VBA ... ... all beginners know such syntax of references:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-26-2013
    Location
    Kent
    MS-Off Ver
    Office 365 - Excel
    Posts
    15

    Re: Converting linked excel tables to PP pictures - positioning issue - help!

    Yes, I've only used VBA briefly. I already have the above in my code so not sure what you mean.

    I found the code elsewhere and works but just need it to past back in the same position which it does not do at the momment thanks

+ 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. Replies: 1
    Last Post: 05-02-2014, 06:18 AM
  2. automatically update excel linked pictures/objects
    By Darkenergyz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2014, 07:38 AM
  3. Adding pictures into excel, linked to cell totals.
    By Harrydad57 in forum Excel General
    Replies: 3
    Last Post: 12-16-2010, 08:50 PM
  4. [SOLVED] Positioning all pictures
    By gejmond in forum Excel General
    Replies: 3
    Last Post: 06-26-2006, 03:55 PM
  5. Positioning pictures in a cell
    By ZipCurs in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-29-2005, 03:20 PM
  6. linked pictures in Excel
    By sergiu in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-28-2005, 05:05 PM
  7. Memory Leak Excel 2003 vs 2000 using linked pictures
    By Scriptick in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2005, 12:06 PM

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