Symmetric part modification external reference with macro

Hello

I use a macro in an excel file to set up an assembly, and then I rename that assembly and save it to a particular path.

In this assembly, I have symmetrical parts. I want the external reference of the symmetrical part to be changed with the name of the new part before being saved under its new name.

Thank you in advance for your help because I can't get unblocked.

To change the reference: ReplaceReferencedDocument Method (ISldWorks)

http://help.solidworks.com/2020/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.ISldWorks~ReplaceReferencedDocument.html?verRedirect=1

Example:

http://help.solidworks.com/2020/english/api/sldworksapi/Replace_Referenced_Document_Example_VB.htm