Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found the following code from the forum: Thanks.
However, it runs one time. All fine.
But repeated use of the same gives an error message!
SyntaxEditor Code Snippet
Sub Main() 'LayerAddTest() Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Dim oLayers As LayersEnumerator' oLayers = oDrawDoc.StylesManager.Layers Dim oLayer As Layer ' oLayer = oDrawDoc.StylesManager.Layers.Item(68) oLayer = oDrawDoc.StylesManager.Layers.Item("Title (ISO)") Dim oNewLayer As Layer oNewLayer = oLayer.Copy("waynes_layer_copy") ' ' oNewLayer.Color = ThisApplication.TransientObjects.CreateColor(0, 0, 255) End Sub
Could someone help me?
Solved! Go to Solution.