Link to a page in an excel which is an object in word

  • Thread starter Sreejith Periyadath
  • Start date
S

Sreejith Periyadath

I have inserted an excel file as an object in word
document, represented
by an icon. When I click on the icon, it opens up the
excel sheet. Now, I
need to given some hyperlinks at some other parts of the
same word
document, which will point to the different worksheets in
the excel sheet.
Is this possible and if yes how? Please help me out here.
The idea is to have the Excel file as an object in Word so
that I don't
need to send the Excel too when I send across the Word
document to my
peers. In the word document, I need to give link to the
different
worksheets of the excel sheet. In fact I am not even able
to invoke the
excel file object itself through a link in the word
document (rather than
clicking on the object icon).
I am not sure if this is asking too much from the
software. But, I think
it would be very helpful. Please let me know if you have
any idea on this.

Thanks,
Sreejith
 
C

Cindy M -WordMVP-

Hi Sreejith,

I'm afraid you won't be able to do this as you imagine. A
Hpyerlink must point to either a separate file, or a
(bookmark) position within the same file.

An object is an OLE container embedded in a file. As far as
Word is concerned, this container is a graphic. Only once the
container has been activated do you enter the parent
application's environment. But Word and this application
don't really recognize each other.

Your only chance, really, would be to use Macrobutton fields
in the Word document that would activate the object's
container, then automate the object's parent application
(Excel), selecting the target cell.
I have inserted an excel file as an object in word
document, represented
by an icon. When I click on the icon, it opens up the
excel sheet. Now, I
need to given some hyperlinks at some other parts of the
same word
document, which will point to the different worksheets in
the excel sheet.
Is this possible and if yes how? Please help me out here.
The idea is to have the Excel file as an object in Word so
that I don't
need to send the Excel too when I send across the Word
document to my
peers. In the word document, I need to give link to the
different
worksheets of the excel sheet. In fact I am not even able
to invoke the
excel file object itself through a link in the word
document (rather than
clicking on the object icon).
I am not sure if this is asking too much from the
software.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
S

Sreejith Periyadath

Thank you very much Cindy. I had a feeling that it may not
be possible, but I wanted a final word from an expert.
Thank you for the background information too, which I was
never aware of. I would love to try out the macro buttons,
but I am not very sure of how I should proceed. Could you
please let me know if you have some information on this
handy?

Regards,
Sree
 
C

Cindy M -WordMVP-

Hi Sreejith,
I would love to try out the macro buttons,
but I am not very sure of how I should proceed.
Here's a sample macro that searches for and activates an
Excel sheet object (formatted inline with the text), then
jumps to a named range on the sheet:

Sub ActivateExcelCell()
Dim ils As Word.InlineShape
Dim doc As Word.Document
Dim of As Word.OLEFormat
Dim o As Object

Set doc = ActiveDocument
For Each ils In doc.InlineShapes
If InStr(ils.OLEFormat.ClassType, "Excel") _
<> 0 Then
Set of = ils.OLEFormat
of.DoVerb wdOLEVerbPrimary
Set o = of.Object
o.Application.GoTo _
Reference:="Test", Scroll:=False
Set o = Nothing
Exit For
End If
Next ils
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top