Don't works
ActivePage.Guides(cdrAllGuides).RemoveAll
Nor
ActiveDocument.Pages(0).Guides(cdrAllGuides).RemoveAll
Thus you need to do it that:
For Each sh In CorelDoc.Pages(0).Guides(cdrAllGuides)
sh.Delete
Next sh
Because
For Each sh In ActiveDocument.ActivePage.Guides(cdrAllGuides)
sh.Delete
Next sh
Don't works too.
"I'm going to slightly mad..." :)
---Kostya
PC CD12, SP1, WinXP Pro SP1
Don't know why this works and the other methods fail, however I am sure
Alex will be along sometime to explain. Anyway....
Using my brute force and ignorance approach to programming, I looked the
the various examples in the help file and saw this starting method for
finding out how many of each guideline type there are on a page and
substituted the reporting code with s.delete
HTH
Peter
Sub DeleteGuides()
Dim s As Shape
For Each s In ActiveDocument.Pages(0).Guides(cdrAllGuides)
s.Delete
Next s
End Sub
Sakis
"Kostya" <d-signer...@cnews1.corel.dmz (there add 'at' sign)> wrote in
message news:4139b56a_1@cnews...
Have you visited Alex Vakulenko's Draw VBA forums at
When things haven't worked as expected for me, he has been really
helpful.
Peter
Sakis
"Peter Clifton" <peterN_O_@S_P_A_M_clifton89.freeserve.co.uk> wrote in
message news:MPG.1ba570a55...@cnews.corel.ca...
> Two years now, I've switched to Illustrator for my primary design jobs
> because of Corels bugs, although i don't like Adobe user interface. Now i
> think it's time to learn Adobe scripting API, removing Corel garbage from
> our company's disks.
Then why post in a Corel technical support forum if you are not willing
to offer help in solving problems or providing useful workarounds.
Peter
"No good deed goes unpunished" - Clare Boothe Luce
Sakis
"Peter Clifton" <peterN_O_@S_P_A_M_clifton89.freeserve.co.uk> wrote in
message news:MPG.1ba6403de...@cnews.corel.ca...
> By the way, posting in a Corel newsgroup doesn't mean that i'm here only to
> offer help but also asking for that.
I saw nothing in your answer that offered help.
> Unless you mean that i have to like Corel :)
I saw nothing in your answer that indicated a light hearted post, only
another rant.
I do not know why some classes fail, however I took the time to find a
method that worked and posted what I believe to be a helpful response.
I may not be a Corel Evangelist/Guru, but I know that continued negative
posting, sometimes for no good reason, has consequences.
Have you any idea how depressing it is to use a package day in day out
and earn a living, spend hundreds, if not thousands of hours, trying to
help people do the same only to see a prolonged period of
harsh/destructive criticism change the whole dynamic of the groups.
Peter
Yes Peter, i know that quite well. May i ask you if you know how annoying is
spending hours of working and finally loose your job because of countless
CARMs ?
Have you any idea how annoying is waiting years for simple bug fixes that
Corel never fixed ? Or loosing months of add-ins development, because of
undocumented Corel missing functions ? Or spending time and money, talking
with Corel tech people asking for help on various bugs.
Come on Peter, i'm sure you know quite well what i ment. I wish i knew
better English to describe my Corel experience, that's not an ordinary
application, it's an adventure.
I can honestly say that has not been my experience, using CorelDRAW has
been and still is overwhelmingly positive experience.
Peter
I really wish i had same positive experience as you Peter. Unfortunately i
had to switch to AI, something i never enjoyed because of Adobe's stiff user
interface.
Anyway, i respect your opinion. Just a few years ago, i'd agree with you :)
Sakis
If you are choosing between CorelDraw and Illustrator you are choosing between
the lesser of two evils. But not of two goods.
Each of the vector editors has enough ideology-based solutions, tools, methds
and so on. For example: Corel denies to made artistic and paragraph text
stretching, while in Illustrator it's very useful feature. Adobe denies to made
commands for node works, even deleting a several nodes simultaneously, while in
CorelDraw it's makes your works more quick and more fine. And so and so and
so...
How can we influence the producers of program products?
---Kostya
Can you be more specific on what kind of problems you have in CorelDRAW as
far as automation is concerned?
As far as I know, SP1 has fixed quite a few of problems and now Draw 12 is
quite good and stable, including VBA support...
Any more details would be appreciated.
Alex
What you need to do is to call Delete method. RemoveAll just removes objects
from a ShapeRange obejct. It doesn't delete the shapes from the document.
This method is very useful when you use a ShapeRange as a temporary storage
for a set of shapes and when you want to reuse it for something else.
In your case, I would just use (in CorelDRAW 12):
ActiveDocument.MasterPage.Guides.Delete
I hope this helps.
Alex
"Kostya" <d-signer...@cnews1.corel.dmz (there add 'at' sign)> wrote in
message news:4139b56a_1@cnews...
>
"The RemoveAll method removes all shapes from the range.
The shapes are removed only from a specific range object and not from any other
ranges of which it may be a part.
The shapes are not deleted from the document." (c) Corel Corporation
I withdraw a petition.
Thanks Alex.
---Kostya
BTW
"Alex Vakulenko" <alexv@vakcer_dot_com> сообщил/сообщила в новостях следующее:
news:413d1e96$1_3@cnews...