Save file from assembly

How to save selected file in assembly with new name and checked as a copy?

Now i try this:



if (saveFile.ShowDialog() == DialogResult.OK)

                        {

                            string path = "";

                            path = saveFile.FileName;

                            swModExt = swModel.Extension;

                            swSelMgr = (SelectionMgr)swModel.SelectionManager;

                            swCompEnt = (Entity)swSelMgr.GetSelectedObject6(1, -1);

                            swComponent = (Component2)swCompEnt.GetComponent();

                            IModelDoc2 newPart = (IModelDoc2)swComponent.GetModelDoc2();

                            boolStatus = newPart.SaveAs(path);

                        }

if someone will show the code in VBA is good too

SolidworksApi macros