Manipulate CorelDraw layers

LayerCreate

Corel VBA provides a function for adding layers, but that one reports an error when the layer already exists and stops the code.

ATTENTION: Requires LayerExists Function (Page 2)

'Create a new layer
Public Sub LayerCreate(varLayerName As String)

Set myDoc = Application.ActiveDocument
If Not LayerExists(varLayerName) Then myDoc.ActivePage.CreateLayer (varLayerName)

End Sub

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.

“In theory, theory and practice are the same. In practice, they're not.”