I have only provided you with a part of my code, I have advanced a little this morning and found solutions (my code is provided below). The problem that arises with this code is that I can't get the MEP title through the same means as parts and assemblies. Indeed this code saves the part, the mep, the assembly at the beginning but not at the end because it closes instead of my mep. As a result, references in the assembly are lost.
Sub main()
Set swapp = _
Application.SldWorks
Set Part = swapp. OpenDoc6("\\xxxxxx", 2, 0, "", longstatus, longwarnings)
swapp. ActivateDoc2 "Pot Store Set", False, longstatus
Set Part = swapp. ActiveDoc
F1. Show
Set swAppp = Application.SldWorks
Set swmodel = swAppp.ActiveDoc
bool = swmodel. Extension.RunCommand(SwCommands.swCommands_SaveAs, "")
'swapp. OpenDoc(Name,Type) '
Set Part = swapp. ActiveDoc
'Get the link
FilePath = swmodel. GetPathName
'Retrieves the number of characters
PathSize = Len(FilePath)
'Recovers file name only without extension
PathNoExtension = Left(FilePath, 29)
TitleA = swmodel. GetTitle
TitleAs = Len(TitleA)
TitleAn = Left(TitleA, TitleAs - 7)
Set Part = swapp. ActiveDoc
Set Part = swapp. OpenDoc6("\\xxxxx"", longstatus, longwarnings)
Set Part = swapp. ActiveDoc
swapp. ActivateDoc2 "Store pots.sldprt", False, longstatus
Set Part = swapp. ActiveDoc
Set Part = swapp. OpenDoc6("\\xxxxx", 3, 0, "", longstatus, longwarnings)
Set Part = swapp. ActiveDoc
swapp. ActivateDoc2 "Jar Store - Sheet1", False, longstatus
Set Part = swapp. ActiveDoc
bool = swmodel. Extension.RunCommand(SwCommands.swCommands_SaveAs, "")
Set Part = swapp. ActiveDoc
TitleM = swmodel. GetTitle
TitleMs = Len(TitleM)
TitleMn = Left(TitleM, TitleMs - 7)
Set Part = swapp. ActiveDoc
Set Part = Nothing
swapp. CloseDoc TitleMn
Set Part = swapp. ActiveDoc
swapp. ActivateDoc2 "Store pots.sldprt", False, longstatus
Set Part = swapp. ActiveDoc
Set swAppp = Application.SldWorks
Set swmodel = swAppp.ActiveDoc
bool = swmodel. Extension.RunCommand(SwCommands.swCommands_SaveAs, "")
TitleP = swmodel. GetTitle
TitlePs = Len(TitleP)
TitlePn = Left(TitleP, TitlePs - 7)
Set Part = swapp. ActiveDoc
Set Part = Nothing
swapp. CloseDoc TitlePn
Set Part = swapp. ActiveDoc
swapp. ActivateDoc2 TitleAn, False, longstatus
Set Part = swapp. ActiveDoc
Set Part = swapp. ActiveDoc
longstatus = Part.SaveAs3(FilePath, 0, 2)
Set Part = swapp. ActiveDoc
Set Part = Nothing
swapp. CloseDoc TitleAn
F2. L_2 = TitleMn
F2. Show
End Sub