OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 26-10-2005, 05:21
Posts: n/a
Default powerclip extract

Hi! I'm newbie in VBA and I can't make a very easy macro..

I need to extract all powerclip contents (from objects and from outlines) on page and delete these.

Can somebody help me?
Reply With Quote
Old 26-10-2005, 07:57
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4

Here you go...

Sub DeletePowerclips()
    Dim s As Shape
    Dim sr As ShapeRange
    Dim srPowerClips As New ShapeRange
    ' Find all powerclips (omit powerclips inside powerclips)
    For Each s In ActivePage.FindShapes()
        If Not s.PowerClip Is Nothing And s.PowerClipParent Is Nothing Then
            srPowerClips.Add s
        End If
    Next s

    ' Now extract and delete contents of the powerclips
    For Each s In srPowerClips
        Set sr = s.PowerClip.ExtractShapes
    Next s
End Sub
Reply With Quote
Old 26-10-2005, 08:26
Posts: n/a

Thank you for fast reply!

The code works good, but only with shapes, when I have curves in document then I become the error warning: 'This shape is not of the correct type to support this property of method.'
And I need extract powerclips from curves too!
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[BUG] - Fountain fill is'nt rotate in powerclip Kursad General 3 01-07-2005 22:01
How can I extract a piece of a bitmap object using VBA code oswaldon Corel Photo-Paint VBA 2 25-04-2004 20:37
VBA hint to extract CorelDraw images from msWord.doc Henri Socha CorelDRAW/Corel DESIGNER VBA 1 04-04-2003 12:11

All times are GMT -5. The time now is 02:44.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com