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.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” - Martin Fowler