How to save a Word File with local hyperlinks as PDF, with a functioning hyperlink on the PDF document. RRS feed

  • Question

  • How to link local documents (such as text file, pdf) in word so that after saving it as pdf, when the hyperlink is clicked the file opens up properly.

    I want to add a hyperlink for a text file, which is in the same directory under a folder called “attachment”, if I click a hyperlink in a word document, it opens the file properly, and I want to do the same with a pdf document. How do I accomplish this?

    • Edited by Deepak_Chand Friday, January 3, 2014 7:11 AM
    • Moved by Marvin_Guo Monday, January 6, 2014 3:18 AM Word issue
    Friday, January 3, 2014 7:09 AM


  • Hello Deepak_Chand,

    It looks like your question is not related to Outlook. That is why I would recommend asking such questions on the Word for Developers forum instead.

    Anyway, you need to specify the relative path to the file for the Add method of the Hyperlinks class from the Word Object Model. For example, MSDN provides the following description for the Address parameter:

    The address for the specified link. The address can be an e-mail address, an Internet address, or a file name. Note that Microsoft Word doesn't check the accuracy of the address.

    So, you can try to specify the following: "attachment\\filename.txt".

    • Marked as answer by Marvin_Guo Monday, January 13, 2014 9:53 AM
    Friday, January 3, 2014 8:36 AM