powerclip none - give it global - feature request - reg.

Sir

when multiple objects selected, and is consiting of powerclips,

allow to active the command NONE (Remove the powerclip contents).

regards

sriram 

Parents Reply
  • In writing the code the extraction would take place but only the last shape would revert back to none.

    That is exactly what I observed when I tried doing this, and it was very frustrating!

    I looked at your code then, saw the DoEvents, and tried adding that to mine. Shazam! I have never used DoEvents before. So, again, I really appreciate you sharing that!

    Perhaps this has something to do with using the "Invoke" stuff to do things that aren't directly exposed to us in the API?

    I think that might defeat the purpose of using a CommandGroup, though. If I try your macro and then check the undo list, it's not all under one entry. This is what it looks like after processing three PowerClips in a selection:

    I will also comment that I don't think one needs to do any extracting/deleting; the "Unassign Frame" seems to take care of that automatically. After adding DoEvents, I was able to strip my version down to this:

    Sub Unassign_PowerClip_frames()
    
    Dim sr As New ShapeRange
    Dim s As Shape
    
        On Error GoTo ErrHandler
        
        sr.AddRange ActiveSelectionRange
        
        For Each s In sr
            If Not s.PowerClip Is Nothing Then
                s.CreateSelection
                Application.FrameWork.Automation.InvokeItem "7b022531-3cd7-487f-a797-9d80179dc821"
                DoEvents
            End If
        Next s
    
    ExitSub:
        Refresh
        Exit Sub
    
    ErrHandler:
        MsgBox "Error occurred: " & Err.Description & vbCrLf & vbCrLf & "Unassign_PowerClip_frames()"
        Resume ExitSub
    End Sub
    
Children