locked
Document ID Path of Embedded Excel Ojbect RRS feed

  • Question

  • Good Afternoon,

    I want to embed an Excel sheet into a Word document and create a hyperlink in the body of the Word document that links to a specific worksheet/cell in the Excel sheet.

    I have made a workaround that works locally by opening the worksheet and copying the cell and then pasting as hyperlink into the Word document. The hyperlink looks like {hyperLINK "\\.!_1443610603" \l "'Sheet 1'!A1"}. When the file is sent on email it works fine in Outlook, but when saved locally it becomes {hyperLINK "file:///C:\\.!_1443610603" \l "'Sheet 1'!A1"} and Word errors with "Cannot open the specified file".

    I believed the problem was the ID, but it seems to remain the same. So, the problems seems to be with the path. Is there a way to establish this path so it does not change?

    I am using Office 2007.

    Regards.

    Reposted from MSDN forum: Word for Developers.

    Monday, November 4, 2013 9:42 PM

All replies

  • Hi,

    Since you posted the issue in MSDN, I notice that you did not sand the Excel file with the Word file. The hyperlink did not embe the Excel worksheet in doc file, hyperlink is stored as relative to the folder that contains the workbook.Thus the hyperlink only shows the file path, you'd better share your Excel file in a Network driver before you sent the doc file to your customers.

    Next,you could try to create a hyperlink from a Word document to an Excel workbook with the article:

    http://shaunakelly.com/word/word-and-excel/excelhyperlinks.html

    Following this, as the following error message: "Cannot open the specified file".

    This issue may  occur if the hyperlink in your Word document was inserted while the document was located on a network share, and   the document was subsequently moved.

    Please fix the issue with the following KB:

    http://support.microsoft.com/kb/326518

    http://support.microsoft.com/kb/2504640

    Regards,

    Thanks,

    George Zhao

    Forum Support

    ________________________________________

    Come back and mark the replies as answers if they help and unmark them if they provide no help.

    If you have any feedback on our support, please click here


    • Edited by George123345 Wednesday, November 6, 2013 2:03 AM
    Tuesday, November 5, 2013 2:37 AM
  • The Excel file is embedded into the Word file. I did not list these steps because they are implied in the Title.

    I do not understand why "file:///C:" is being appended to the relative path when the document is saved (i.e. making it an absolute path). I want to path to be relative regardless of when/where the document is saved. When I remove this prefix the link works.

    • Edited by Mr. Karl Tuesday, November 5, 2013 6:58 PM Added Last Step
    Tuesday, November 5, 2013 6:57 PM
  • Hi,

    I tried to produce the issue in my computer and I want to divide the situation for three steps.

    First step, I created a Word file and inserted an Excel file as an object.Then I create a hyperlink  {HYPERLINK "C:\\MyDocuments\\MyExcelFile2.xls" \l "'Sheet 1'!A1"}

    Second step, I want to send the Word file through Outlook. Could you tell me which way did you send the doc?

    By using add an attach file or inserting the doc as an object in Outlook? I notice that you said it works fine in Outlook. Did you mean that the hyperlink could be click and link the right path in Outlook preview?

    If it was, the issue may be caused by the third step.

    Third step, I save as the file to the location.It encountered the same error message.

    Could you try to share the Excle in a network disk and establish a session with the file server before you use a hyperlink that has the \\FileServer\ShareFolder format.

    Regards,

    Thanks,

    George Zhao

    Forum Support

    ________________________________________

    Come back and mark the replies as answers if they help and unmark them if they provide no help.

    If you have any feedback on our support, please click here

     

    Wednesday, November 6, 2013 5:38 AM
  • Thank you George,

    Those steps are succinctly what I have done.

    I added the Word file to an Outlook message with Add Attachment. I opened the Word file from the received message and it links to the embedded file, but when I saved the file to the Desktop it changed the hyperlink.

    The desired process is to distribute the Word file and not be dependent on any network connectivity for the link to work.

    Wednesday, November 6, 2013 3:55 PM
  • Hi,

    I had tried to use the link:{hyperLINK "\\.!_1443610603" \l "'Sheet 1'!A1"} in my computer. But I find if I use this link,and the comment had showed the "file:///C:\\.!_1443610603" \l "'Sheet 1'!A1" before I send it through Outlook, please refer to the following link:

    So I could not reproduce your issue. Could you use Step records to record your steps,upload the SkyDrive and share to me?

    Regards,

    Thanks,

    George Zhao

    Forum Support

    ________________________________________

    Come back and mark the replies as answers if they help and unmark them if they provide no help.

    If you have any feedback on our support, please click here

     

    Thursday, November 7, 2013 2:07 AM
  • Hi,

    Just checking in to see if the information was helpful. Please let us know if you would like further assistance.

    Thanks,

    George Zhao
    Forum Support
    ________________________________________
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "tnfsl@microsoft.com"
    Wednesday, November 13, 2013 1:31 AM