Change design table path with macro and keep it linked

Hi all,

I'm searching a way to change the path of a design table inside a lots of parts that is linked to an external Excel file. I'm able to delete the design table and insert the new design table but when I edit the new design table there is not look correct. The first is what I have when I do the macro and what is supposed to do on second picture. Can you help me someone???

SolidworksApi macros