| Name | Type | Description |
|---|---|---|
| x |
Double
|
|
| y |
Double
|
|
| Width |
Double
|
|
| Height |
Double
|
|
| KeepAspect |
Boolean
|
Specifies whether to maintain the proportions of the bounding box relative to its contents. |
| ReferencePoint | Specifies the reference point. |
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 If
End Sub