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 21-10-2004, 18:58
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,787
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 Delete All Guides

I was trying to write a script that would delete all guidelines on my current page. I thought it would be as simple as:

Code:
Sub DeleteGuides()

ActivePage.Guides(cdrAllGuides).Delete

End Sub
But it doesn't seem to work. Nothing seems to happen. No errors, and guides are still on page. Any ideas? Trying this on CorelDraw 12 SR1. Thanks for the help.
Reply With Quote
  #2  
Old 21-10-2004, 20:51
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Delete All Guides

That's because the guides are not the current page, but on the master page.

Use this:

Code:
Sub DeleteGuides()
    ActiveDocument.MasterPage.Guides(cdrAllGuides).Delete 
End Sub
Reply With Quote
  #3  
Old 22-10-2004, 10:12
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,787
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 Help File

I think the help file may need updated. I was trying to following this example:

Code:
Page.Guides

Property Guides([ByVal Type As cdrGuideType = cdrAllGuides (-1)]) As ShapeRange

Description

The Guides property returns returns a set of local guidelines defined on the page. 

Type
 Specifies the type of guideline on a page. This value returns cdrGuideType. [in]
Optional
Default value = cdrAllGuides (-1)
 
Example

The following example deletes all of the local vertical guidelines on the active page.

Sub Test()

 ActivePage.Guides(cdrVerticalGuide).Delete

End Sub
BTW your example worked GREAT!!! You are the man as always Alex.
Reply With Quote
  #4  
Old 22-10-2004, 17:36
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Help File

I guess you are right, the help file should have used a different example. However this is not to say that the example in the help is wrong. The description stated that the code "deletes all of the local vertical guidelines on the active page". Technically you can place page-specific guidelines, and that's what this code will delete.

But I agree that most users would be concerned with guidelines on the master page, and therefore the example should show how to do that instead... Valid point.
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
delete vba project from cdr file hotairballoon CorelDRAW/Corel DESIGNER VBA 1 18-05-2005 09:08
Deleting Shapes on the Guides Layer Rick Randall CorelDRAW/Corel DESIGNER VBA 2 28-09-2004 11:07
Bounding Guides, with & without Outlines Hernán New product ideas 0 21-01-2004 10:59
Delete Segment Enhanced Hernán New product ideas 1 08-12-2003 15:04
Bounding Guides for CorelDRAW 11 Hernán Macros/Add-ons 1 14-07-2003 23:56


All times are GMT -5. The time now is 18:25.


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