# Having trouble with Document.SaveAsCopy

I'm trying to use Document.SaveAsCopy, but I am not getting the desired results. It seems to depend on the Range that I have chosen.

If I use this, specifying Selection for the Range:

 ```1 2 3 4 5 6 7 8``` ```Sub test_SaveAsCopy() Dim OptSave As New StructSaveAsOptions OptSave.Range = cdrSelection ActiveDocument.SaveAsCopy "D:\foo.cdr", OptSave End Sub ```

then it works as I would expect. A copy of the current document - but with only the selected objects - is created, but is not opened.

------------------------------------------------------------------------------------------

If I use this, specifying AllPages for the Range:

 ```1 2 3 4 5 6 7 8``` ```Sub test_SaveAsCopy() Dim OptSave As New StructSaveAsOptions OptSave.Range = cdrAllPages ActiveDocument.SaveAsCopy "D:\foo.cdr", OptSave End Sub ```

then it behaves as though I had performed a "Save As".  The active document changes to be the just-created document. That is of course not what I want; I'm using SaveAsCopy because I just want to save a copy of the document and then continue editing the original document.

I see the same result if I use the SaveAsCopy without specifying any StructSaveAsOptions.

------------------------------------------------------------------------------------------

If I use this, specifying CurrentPage for the Range:

 ```1 2 3 4 5 6 7 8``` ```Sub test_SaveAsCopy() Dim OptSave As New StructSaveAsOptions OptSave.Range = cdrCurrentPage ActiveDocument.SaveAsCopy "D:\foo.cdr", OptSave End Sub ```

then I see this error:

Click on Debug, and it highlights the line:

ActiveDocument.SaveAsCopy "D:\foo.cdr", OptSave

Am I doing something wrong here? Can others confirm that SaveAsCopy is (or is not) working correctly for them?