Sub Test() Dim x As Double, y As Double, sx As Double, sy As Double Dim FileName As String, sr As ShapeRange If Documents.Count = 0 Then MsgBox "No document is open", vbCritical Exit Sub End If Set sr = ActiveSelectionRange If sr.Count = 0 Then MsgBox "No shapes selected", vbCritical Exit Sub End If sr.GetBoundingBox x, y, sx, sy FileName = CorelScriptTools.GetFileBox("All Files(*.*)|*.*", "Select a file to import") If FileName <> "" Then ActiveLayer.Import FileName Set sr = ActiveSelectionRange If sr.Count > 0 Then sr.SetBoundingBox x, y, sx, sy, True End If End IfEnd Sub