Manipulate CorelDraw layers

LayerExists

This code checks if a layer exists

'Check if layer exists
Public Function LayerExists(varLayerName As String)

Set myDoc = Application.ActiveDocument
LayerExists = False
For Each Layer In myDoc.ActivePage.Layers
     If Layer.Name = varLayerName Then LayerExists = True
Next

End Function

You might also like...

Comments

About the author

 Thamar

Thamar Poland

I was born in a small town in Holland, and currently live in Poland. I'm fluent in English, German, Polish and Dutch, speak a bit of French and Russian. After finishing Information Technologies ...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Rick Osborne