Assume a Word doc, say, "A.Doc", has been inserted (as an object) into a spreadsheet on tab "B". It is easy to open the object by double clicking on the Icon, but is there a way to hyperlink to the embedded object?
Thanks
Assume a Word doc, say, "A.Doc", has been inserted (as an object) into a spreadsheet on tab "B". It is easy to open the object by double clicking on the Icon, but is there a way to hyperlink to the embedded object?
Thanks
"It's not just the due date that's important, it's also the do date" [MWE]
When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.
I'm a little confused about what your asking here - but very interested.
Would you like to create a hyperlink that navigates to a new worksheet where an embedded object (A.DOC) is ? Or would this also work inside the worksheet that has the object?
I have a similar desire to use hyperlinks to embed objects into a spreadsheet on a temp sheet. So I would love to hear what answers you get.
Is there any way to get a click event on text in a cell without using Hyperlink?
Maybe that would solve our problems![]()
To live is Christ... To code is cool!
I primary need is to create a hyperlink from inside the workbook that leads to the inserted object and opens it. There are several workarounds, e.g., A.Doc initially resided outside the workbook; creating a hyperlink to it (manually of with VBA) was trivial. But that means that the "location" of A.Doc must remain consistent relative to the workbook -- not impossible, but a pain. If A.Doc is inside the workbook, all concerns about location and version management disappear. Directly clicking on the object is another workaround, but that is clumsy.Originally Posted by samohtwerdna
"It's not just the due date that's important, it's also the do date" [MWE]
When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.
MMM - I agree.
Still a little fuzzy - Do you care if the A.Doc is open in Word or embeded into Excel?
I assume that you are looking for something that will work with any embeded object's not just Word Doc's...right?
To live is Christ... To code is cool!
My preference is that A.Doc would be opened by Word (that makes it easier to make changes ... but also makes it possible for another user to make changes). The current need is Word docs, but you are correct assuming that I ultimately seek a method that will work with any embedded object.Originally Posted by samohtwerdna
"It's not just the due date that's important, it's also the do date" [MWE]
When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.
Try this:
Sub GetEmbeddedWordObject() Dim lReply As Long Dim objOLE As OLEObject On Error Resume Next Set objOLE = ThisWorkbook.Worksheets("Sheet1").OLEObjects(1) If Err.Number <> 0 Then ' problem with OLE Object Exit Sub End If lReply = MsgBox("Do you want to Open in Word (Yes), or Edit in Place (No)?", vbQuestion + vbYesNoCancel) Select Case lReply Case vbYes ' To open in a Word instance ' like Right Click > Document Object > Open objOLE.Verb xlVerbOpen Case vbNo ' To activate in Excel as Word object ' like Right Click > Document Object > Edit objOLE.Verb xlVerbPrimary End Select End Sub
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com
_______
thanks. I will play with this and reply back with comments.Originally Posted by JonPeltier
"It's not just the due date that's important, it's also the do date" [MWE]
When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.
Jon: your procedure was very helpful. It gave me the clues and hints to build a very useful general procedure to display embedded objects via VBA.
Thanks
MWE
"It's not just the due date that's important, it's also the do date" [MWE]
When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.