Firstly thanks to everyone for your help. It was a very painful process but without your help it would of been impossible.
I followed the links over to (https://community.adobe.com/t5/photoshop-ecosystem-ideas/is-there-an-option-that-shows-me-a-list-with-all-smart-objects-paths/idc-p/12689475)
went through the jscript(??) and slowly translated it vb.net. Very interesting language, very easy to follow. I thought it might be helpful to other people so I posted my code.
top of the class
imports photoshop
following in a button action, class, function etc...
Dim ref
Dim applicationDesc
Dim theNumber
Dim layerDesc
Dim isSmartObject
Dim theSO
Dim theLink
Dim ps_app As New Photoshop.Application
ref = New ActionReference
ref.putProperty(ps_app.StringIDToTypeID("property"), ps_app.StringIDToTypeID("numberOfLayers"))
ref.putEnumerated(ps_app.CharIDToTypeID("Dcmn"), ps_app.CharIDToTypeID("Ordn"), ps_app.CharIDToTypeID("Trgt"))
applicationDesc = ps_app.ExecuteActionGet(ref)
theNumber = applicationDesc.getInteger(ps_app.StringIDToTypeID("numberOfLayers"))
Dim m = 0
Dim n = 0
Do While m <= theNumber
ref = New ActionReference ' might fall over as it is already declared above
ref.putIndex(ps_app.CharIDToTypeID("Lyr "), m)
layerDesc = ps_app.ExecuteActionGet(ref)
isSmartObject = layerDesc.hasKey(ps_app.StringIDToTypeID("smartObject"))
If isSmartObject = True Then
theSO = layerDesc.getObjectValue(ps_app.StringIDToTypeID("smartObject"))
If theSO.getBoolean(ps_app.StringIDToTypeID("linked")) = True Then
theLink = theSO.getPath(ps_app.StringIDToTypeID("link")) ' this will give the path
End If
End If
m = m + 1
Loop