OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15-05-2010, 10:25
aakkaarr aakkaarr is offline
Senior Member
 
Join Date: Jan 2009
Posts: 154
Default How to identify if the active selection is group or not

Hi
How to identify if the active selection is group or not
if set s = activeselection
then s.type returns 8
The point is, is there any way of getting the exact type of selection
Reply With Quote
  #2  
Old 15-05-2010, 10:57
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
This returns a shape type cdrSelectionShape. This type of shape can be a shape consisting of a selection of many shapes.

One alternative is to use set s = activeshape instead.

This should give you what you need.

-John
Reply With Quote
  #3  
Old 15-05-2010, 15:58
aakkaarr aakkaarr is offline
Senior Member
 
Join Date: Jan 2009
Posts: 154
Default

hi
s = activeshape can not used because there can be more than one shapes selected, any way thanks
Reply With Quote
  #4  
Old 15-05-2010, 16:25
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

oh ok.

Then try this:

Code:
Option Explicit
Sub getShapeType()


Dim s As Shape, sr As ShapeRange

Set s = ActiveSelection

Set s = s.Shapes(1)

If Not s.IsSimpleShape Then MsgBox "We have a group of " & s.Shapes.Count

MsgBox s.Type


End Sub
-John
Reply With Quote
Reply


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
Changing selection when two-shape group loses one shape Joe CorelDRAW/Corel DESIGNER VBA 1 19-02-2009 03:50
Find Group ungroup it then process and again group derasje Macros/Add-ons 2 19-11-2008 05:04
Count objects in active selection on master layer knowbodynow CorelDRAW/Corel DESIGNER VBA 7 27-02-2007 22:48
How to identify a font Alex FAQ 1 27-04-2005 17:18
Howto uniquely identify a shape in VBA code jemmyell CorelDRAW/Corel DESIGNER VBA 9 11-02-2005 22:05


All times are GMT -5. The time now is 21:59.


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