OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 18-03-2004, 17:49
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Create a Group

In the code below I use an outside shape to select the shapes inside it, combine them then fill them. I would now like to group sOutside and sInside. How do you group them?



Sub FillObject()

Dim sOutside As Shape, sInside As Shape
Dim x As Double, y As Double, w As Double, h As Double

Set sOutside = ActiveSelection

sOutside.Fill.UniformColor.RGBAssign 0, 0, 0
sOutside.Outline.SetProperties 0.003, , CreateRGBColor(0, 0, 0)

sOutside.GetBoundingBox x, y, w, h, False
Set sInside = ActivePage.SelectShapesFromRectangle(x, y, x + w, y + h, False).Combine
sInside.Fill.UniformColor.RGBAssign 229, 229, 229
sInside.Outline.SetProperties 0

End Sub
Reply With Quote
Old 18-03-2004, 19:12
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Create a Group


One of the easiest way is to use ShapeRange object:

Dim sr As New ShapeRange
Dim sGroup as Shape
sr.Add sInside
sr.Add sOutside
Set sGroup = sr.Group
I hope this helps.
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
Create Catalog from database like MSWord??? diwin CorelDRAW/Corel DESIGNER VBA 5 06-04-2011 06:26
Can I create CustomShape with VBA for CD? Can I create tool? Jab CorelDRAW/Corel DESIGNER VBA 0 01-02-2005 05:02
create docker window vharun CorelDRAW/Corel DESIGNER VBA 2 26-05-2004 07:56
"Failed to create new document" error Rick Randall CorelDRAW/Corel DESIGNER VBA 3 08-03-2004 15:55
Create text in PP with VBA adriano Corel Photo-Paint VBA 1 07-01-2003 17:09

All times are GMT -5. The time now is 12:42.

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