Get save as name when save as copy is checked?

I have created this small macro to launch the SolidWorks Save As dialog

Dim swapp As SldWorks.SldWorks
Dim swmodel As SldWorks.ModelDoc2
Dim bool As Boolean


Sub RunSWsaveas()

     Set swapp = Application.SldWorks
     Set swmodel = swapp.ActiveDoc
     bool = swmodel.Extension.RunCommand(SwCommands.swCommands_SaveAs, "")

      'swapp.OpenDoc(Name,Type) '

End Sub


But what if I check the "save as copy" option ... how do I get the filename as typed in the save as dialog?


I need this to open the copy of the part right after it has been saved as a copy.

SolidworksApi macros