View Single Post
  #2  
Old 19-11-2003, 09:04
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: VBA problem in PP11

I believe you meant to declare L as "Layer", not "Range" (btw, there is no Range class, but LayerRange). However I assume you just typed your example from the head and these are just typos.

I was able to confirm your problem. Combine doesn't return a layer. However it becomes active so, you can use ActiveLayer to get to it anyway.

The worst thing is that you cannot create a dropshadow from VBA right now. Same story is pretty much for most other tools (masks, brushes, etc). The automation for those was never completed. You will have to rely on CorelScript object to get to those features.

Here is an example:

Code:
Sub Test()
    Dim lr As LayerRange
    Set lr = ActiveDocument.Layers.Paste()
    lr.Combine
    With CorelScript
        .ObjectDropShadow True, 10, 28, 22, 0, 1, 82, False, 0, 2, 1000000#, 5, 0, 0, 0, 0
        .EndObject
    End With
End Sub
Reply With Quote