View Single Post
  #3  
Old 02-03-2013, 06:18
dungbtl's Avatar
dungbtl dungbtl is offline
Senior Member
 
Join Date: Apr 2004
Posts: 146
Default

Seem to get a compile error. I found another post a while back...

Importing to "mouse click position"

I dont know what happens as I get errors. Seems like what im after.

But hopefully your code will do it

Quote:
Originally Posted by AVP View Post
try this

Code:
Sub importgrommet()
 On Error GoTo myerr
    ActiveDocument.ReferencePoint = cdrCenter
    Dim x As Double, y As Double
    Dim Shift As Long
    b = False   <---  Compile Error:  Can't find project or library 
    b = ActiveDocument.GetUserClick(x, y, Shift, 10, False, cdrCursorWinCross)
    Optimization = True
    ActiveDocument.BeginCommandGroup "import"
    ActiveLayer.Import "C:\@_Drop\pins.cdr"
    ActiveShape.SetPosition x, y
myerr:
    ActiveDocument.EndCommandGroup
    Optimization = False
    ActiveWindow.Refresh
End Sub
Thanks !

Last edited by dungbtl; 02-03-2013 at 06:25.
Reply With Quote