Results 1 to 6 of 6

Thread: Location or Position of any object

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Location or Position of any object

    Hi John,

    Using the similar fashion below, please help me with a code that can pickup location or position of any object on the ppt slide and apply that to another object on the same slide or any other slide.

    Dim adj() As Single 
    Sub PickUp_Ang_Adj() 
        Dim oshp As Shape 
        Dim i As Integer 
    On Error Goto err: 
        Set oshp = ActiveWindow.Selection.ShapeRange(1) 
        Redim adj(1 To oshp.Adjustments.Count) 
        For i = 1 To oshp.Adjustments.Count 
            adj(i) = oshp.Adjustments(i) 
        Next i 
        Exit Sub 
    err: 
        MsgBox "Select Shape" 
    End Sub 
     
    Sub Apply_Ang_Adj() 
        Dim oshp As Shape 
        Dim i As Integer 
    On Error Goto err: 
        For Each oshp In ActiveWindow.Selection.ShapeRange 
            Redim Preserve adj(1 To oshp.Adjustments.Count) 
            For i = 1 To oshp.Adjustments.Count 
                oshp.Adjustments(i) = adj(i) 
            Next i 
        Next oshp 
        Exit Sub 
    err: 
        MsgBox "ERROR" 
    End Sub
    - Thanks
    Last edited by Bob Phillips; 05-06-2014 at 01:29 AM. Reason: Added VBA tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •