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 31-10-2011, 14:07
gebp
Guest
 
Posts: n/a
Default Count shapes on Pritable are

Hi all.
I'm beginer in VBA, so I don't understand all in VBA language. I want to write a macro for mayself but I have a problem.

For first I need count, how much shapes are put on printable area in all layers. Not all document, not all pages and not outside printable area.
I traied many times. But always result was number of shapes inside and outside printable area.

Please about a lite example where is the way.

Thanks in advance and sorry for may english.
Reply With Quote
  #2  
Old 31-10-2011, 14:22
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
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 Printable

Do you mean inside the printable page? or just that the shape is set as printable?

-Shelby
Reply With Quote
  #3  
Old 31-10-2011, 15:34
gebp
Guest
 
Posts: n/a
Default

Of course objects (eg. shapes) inside printable page not pritable objects.

I'm sorry for may imprecise expression of problem.
Reply With Quote
  #4  
Old 31-10-2011, 19:02
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
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 Shapes on Page

I would select all the shapes on the page and get a count like this:
Code:
Sub ShapesOnPageCount()
    Dim s As Shape
    Dim x As Double, y As Double, w As Double, h As Double
    
    ActivePage.GetBoundingBox x, y, w, h
    Set s = ActivePage.SelectShapesFromRectangle(x, y, x + w, y + h, False)
    
    MsgBox s.Shapes.Count
End Sub
This will select only shapes that 100% on the page, if you want shapes that are partly on the page, change the False to True.

-Shelby
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
Small Text Character Count Bug X4 SP2 runflacruiser CorelDRAW/Corel DESIGNER VBA 4 24-05-2011 08:55
X5 Documents.Count error knowbodynow CorelDRAW/Corel DESIGNER VBA 1 04-05-2010 22:30
count colors in PP Jeff Harrison Corel Photo-Paint VBA 0 17-12-2008 02:38
PP12 tools count = 0 Michael Cervantes Corel Photo-Paint VBA 0 29-05-2004 23:09
looping until documents.count = 0 bbolte CorelDRAW/Corel DESIGNER VBA 18 18-02-2003 15:03


All times are GMT -5. The time now is 17:27.


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