Hi All,
I'm new to Coreldraw but having been writing VBA macros in office for a long time. I was given a project to help automate some tasks within the graphics dept. i basically have 2 approaches.
Approach 1: Copy shapes or objects from a current file and paste into new file - current approach I'm taking.
Approach 2: Creat the shapes or objects from scratch - no luck, when recording the macro I get a lot of recording of this command is not supported.
In terms of Approach 1 - i've written the following code but get an error on the copy line.
When it process the "activeselection.copy" line in vb, I get an error or unexpected error occurred while executing method coVGShape::copy message.
Any help would be much appreciated.
Thanks,
Ken
I'm new to Coreldraw but having been writing VBA macros in office for a long time. I was given a project to help automate some tasks within the graphics dept. i basically have 2 approaches.
Approach 1: Copy shapes or objects from a current file and paste into new file - current approach I'm taking.
Approach 2: Creat the shapes or objects from scratch - no luck, when recording the macro I get a lot of recording of this command is not supported.
In terms of Approach 1 - i've written the following code but get an error on the copy line.
Code:
Sub copyhubshape()
Dim doc As Document
Set doc = ActiveDocument
Dim docn As Document
Set docn = CreateDocument
Dim shr As Shape
Set shr = doc.ActivePage.SelectShapesAtPoint(2.001, 7.268, True)
ActiveSelection.Copy
docn.ActiveLayer.Paste
End Sub
When it process the "activeselection.copy" line in vb, I get an error or unexpected error occurred while executing method coVGShape::copy message.
Any help would be much appreciated.
Thanks,
Ken