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 10-02-2004, 08:02
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default Select All

This is going to sound really stupid and maybe I'm just brain dead...

How do I do a "select all" on the active page in VBA?

I want to select everything (i.e. curves, text, etc.)
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #2  
Old 10-02-2004, 08:21
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: Select All

Well, that's simple:

Code:
ActivePage.Shapes.All.CreateSelection
However note, that you do not have to create a selection in most cases in order to do something. In most cases you can just operate on all the shapes at once without explicitly selecting them:

Code:
ActivePage.Shapes.All.Move 1, 0
Reply With Quote
  #3  
Old 10-02-2004, 08:39
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

I ended up using this method...
Code:
ActivePage.FindShapes(Type:=cdrTextShape).AddToSelection
    ActiveSelection.Fill.UniformColor.CMYKAssign 60, 40, 0, 40
...because, what ended up happening when I selected all objects is, the fill incorporated all closed rectangle and polygon shapes and I needed to avoid this. But I do appreciate the info on the move or other operations. That will prove invalueable.

Thanks again Alex.
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #4  
Old 10-02-2004, 08:54
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

Ok, why don't you use this instead:

Code:
ActivePage.FindShapes(Type:=cdrTextShape).ApplyUniformFill CreateCMYKColor(60, 40, 0, 40)
As I said, in most cases you don't have to create a selection. If you do, then most probably you are doing something wrong, or at least inefficiently.

Technically CreateSelection method should be used when the changed selection needs to be returned to the user.

There are a few exceptions but generally this rule stands.
Reply With Quote
  #5  
Old 10-02-2004, 09:14
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

Leave it to you to be a model of efficiency. That is why I love this site so much. I'm always looking for the quickest and cheapest way to get from point A to point B.

You rock!!
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
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
Select different printers in VBA Anonymous General 2 02-02-2005 17:14
How to select all shape ? -=HKLC=- CorelDRAW/Corel DESIGNER VBA 1 25-10-2004 00:10
Select all nodes if the subpath d-signer CorelDRAW/Corel DESIGNER VBA 2 12-05-2004 23:47
VBA Select Printer? Jon Lorber CorelDRAW/Corel DESIGNER VBA 1 12-12-2003 09:36
Select objects inside another shelbym CorelDRAW/Corel DESIGNER VBA 1 25-11-2003 16:01


All times are GMT -5. The time now is 01:57.


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