Jaafar Tribak
Well-known Member
- Joined
- Dec 5, 2002
- Messages
- 9,797
- Office Version
- 2016
- Platform
- Windows
Hi all,
Let's say we have an embeeded and linked document in a worksheet - Does anybody know of a VBA method for retrieving the link source name ?
I am referring to the actual document full path name that is displayed on the oleobject icon or in the formula bar when the oleobject is selected.
I was thinking something like the following function :
The workbook LinkSources Method returns an array containing the source names of all the linked objects but I am after the source name of just the oleobject that I choose.
I guess I could have VBA select the oleobject and brute-force reading the text in the formula bar via using SendKeys or some API calls but that is just too ugly and may not always work.
I have done some research but nothing has come up so far.
Regards.
Let's say we have an embeeded and linked document in a worksheet - Does anybody know of a VBA method for retrieving the link source name ?
I am referring to the actual document full path name that is displayed on the oleobject icon or in the formula bar when the oleobject is selected.
I was thinking something like the following function :
Code:
Function GetLinkSource(ByVal EmbedeedObject As OLEObject) As String
End Function
The workbook LinkSources Method returns an array containing the source names of all the linked objects but I am after the source name of just the oleobject that I choose.
I guess I could have VBA select the oleobject and brute-force reading the text in the formula bar via using SendKeys or some API calls but that is just too ugly and may not always work.
I have done some research but nothing has come up so far.
Regards.