+ 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
    Excel 2003
    Posts
    3

    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
    Valued Forum Contributor
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    777

    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
    Excel 2003
    Posts
    3

    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)

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