Embedding files in Word document so hyperlinks to them still works when files are moved or deleted

5,167

You can insert your object (e.g. PDF file) in the location where your link would be.

Alternately, you can also insert a bookmark first then create a hyperlink that goes to the bookmark. A bookmark works like an anchor in HTML. It won't open your embedded file -- it just takes you to the part of the document you bookmarked.

You might be able to execute a VBA script to open the embedded file. There are examples on the web on how to do this for Excel. Maybe you can apply it to Word.

Share:
5,167

Related videos on Youtube

user2284570
Author by

user2284570

Currently spending my spare time in Ethereum security. Was rewarded by GitHub and Google.

Updated on September 18, 2022

Comments

  • user2284570
    user2284570 over 1 year

    In Microsoft Word I can create hyperlinks to files by selecting text and clickingInsert->Hyperlink.
    But if the file is deleted or the document itself is moved to another machine the link is broken...

    I want to embed files in the document but still access them with hyperlinks. I can create objects but I can't use them as hyperlinks, unless someone knows how to create a link to a document object?

    So how can I embed files (files which which can use the octet/stream MIME type, a powershell script; some binary registry hives, msi installers., .msu files. some version of some DLLs, etc.), so the hyperlinks still works without the files on the drive?

    • CharlieRB
      CharlieRB about 9 years
      You want to embed the files within the Work document itself so the hyperlinks won't break? Wouldn't it be easier to protect the files or location so they can't be deleted or moved? What have you attempted so far?
    • Sun
      Sun about 9 years
      1) Can you explain beside the actual Word docx file, what is the embedded file type you are trying to include? Is it an image or zip file? 2) Can you upload other single file types such as PDF, EML (email), Zip file?
    • Sun
      Sun about 9 years
      Possibly a duplicate of: stackoverflow.com/questions/17834583/…
    • user2284570
      user2284570 about 9 years
      @sunk818 : Yes, I think if I would be able to create a tooltip like this I would not need programming :-). (inserting the file as an icon inside a tooltip would allow me to use the same text). Anyway, the programming you can do with Word allow mostly to access the same features as with the classic GUI.
    • user2284570
      user2284570 about 9 years
      @sunk818 : as I said, the Stack Overflow question doesn't belong to StackOverflow and is closed now.
  • user2284570
    user2284570 about 9 years
    I already told I would upload the docx to web form. So the person who will read it will be unable to access a network share since it is at a different company at a different place. There is no way for uploading the files together. Or is something more that Word can't do while LuaTeX can with PDF?
  • user2284570
    user2284570 about 9 years
    Actually, I don't need show full binary files as web pages :-) .I need to use them with hyperlinks. Or do you know how to create a link to a document object?
  • user2284570
    user2284570 about 9 years
    Nope it won't pass the white list. Just stop to try convice me i can link the file separately. I searched several solution before posting this question.