Forum Discussion
Link excel cell to downloadable document
Hello everyone,
Apologies for improper formatting or confusing wording for my question.
I'm trying to link a downloadable word worksheet into excel in a way that a copy of the original word file will be downloaded each time it is accessed from excel. I want multiple users to click on the word link and fill out the forms without editing the original copy. They will primarily be interfacing with this through office 365.
I'd appreciate any advice, or if you have an alternative recommendation for accomplishing my tas!
Thank you.
Hi johngallagher,
Unfortunately, there is no direct way to create a link in Excel that will open a copy of the Word document immediately. When a user clicks on a hyperlink in Excel, they will always be taken to the original document, regardless of whether it is stored locally or online.
You can try to use a workaround with macro in Excel that will download the Word document and open it in a new window:- Open the Excel workbook where you want to add the macro.
- Press Alt + F11 to open the Visual Basic Editor (VBE).
- In the VBE, click Insert > Module.
- In the new module window, paste the following code:
Sub DownloadAndOpenWordDocument() 'Declare variables Dim wordApp As Object Dim wordDoc As Object Dim downloadPath As String 'Create a new instance of the Word application Set wordApp = CreateObject("Word.Application") 'Get the path to the Word document to download downloadPath = "https://example.com/my-word-document.docx" 'Download the Word document Set wordDoc = wordApp.Documents.Open(downloadPath) 'Open the Word document in a new window wordDoc.Visible = True End Sub
Click the Save button to save the macro.
- To assign the macro to a button, click Insert > Shapes and select the shape of the button you want to use.
- Right-click on the button and select Assign Macro.
- In the Assign Macro dialog box, select the DownloadAndOpenWordDocument macro and click Assign.
- To assign the macro to a keyboard shortcut, click Tools > Customize.
- In the Customize dialog box, click the Commands tab.
- In the Categories list, select Macros.
- In the Macros list, select the DownloadAndOpenWordDocument macro.
- Click the Assign Shortcut Key button.
- Press the keyboard shortcut you want to assign to the macro and click Assign.
- Click Close to close the Customize dialog box.
Now, when you click on the button or press the keyboard shortcut, the macro will run and download the Word document. The Word document will then open in a new window, where you can fill out the form and save it.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
- LeonPavesicSilver Contributor
Hi johngallagher,
Yes, you can create a link in Excel that allows users to download a Word document without editing the original copy. Here are the instructions:
- Save the Word document in a shared location (such as OneDrive or SharePoint or even a shared folder).
- In Excel, select the cell where you want to insert the link and click "Insert" > "Hyperlink".
- In the "Insert Hyperlink" dialog box, select "Existing File or Web Page" and enter the URL to the Word document.
- Click "OK" to create the link.
When a user clicks the link, they will be prompted to download a copy of the Word document. The original Word file will remain unchanged.
Here is a link to a Microsoft support article on how to create hyperlinks in Excel: https://support.microsoft.com/en-au/office/hyperlink-function-333c7ce6-c5ae-4164-9c47-7de9b76f577f
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
- johngallagherCopper ContributorThank you for your response!
When I follow those steps and click the link within the excel sheet, it takes me to the online word document. I realize users could then choose to "download a copy" of the document, but I would like to remove that step and allow them to just open a copy immediately if possible.- LeonPavesicSilver Contributor
Hi johngallagher,
Unfortunately, there is no direct way to create a link in Excel that will open a copy of the Word document immediately. When a user clicks on a hyperlink in Excel, they will always be taken to the original document, regardless of whether it is stored locally or online.
You can try to use a workaround with macro in Excel that will download the Word document and open it in a new window:- Open the Excel workbook where you want to add the macro.
- Press Alt + F11 to open the Visual Basic Editor (VBE).
- In the VBE, click Insert > Module.
- In the new module window, paste the following code:
Sub DownloadAndOpenWordDocument() 'Declare variables Dim wordApp As Object Dim wordDoc As Object Dim downloadPath As String 'Create a new instance of the Word application Set wordApp = CreateObject("Word.Application") 'Get the path to the Word document to download downloadPath = "https://example.com/my-word-document.docx" 'Download the Word document Set wordDoc = wordApp.Documents.Open(downloadPath) 'Open the Word document in a new window wordDoc.Visible = True End Sub
Click the Save button to save the macro.
- To assign the macro to a button, click Insert > Shapes and select the shape of the button you want to use.
- Right-click on the button and select Assign Macro.
- In the Assign Macro dialog box, select the DownloadAndOpenWordDocument macro and click Assign.
- To assign the macro to a keyboard shortcut, click Tools > Customize.
- In the Customize dialog box, click the Commands tab.
- In the Categories list, select Macros.
- In the Macros list, select the DownloadAndOpenWordDocument macro.
- Click the Assign Shortcut Key button.
- Press the keyboard shortcut you want to assign to the macro and click Assign.
- Click Close to close the Customize dialog box.
Now, when you click on the button or press the keyboard shortcut, the macro will run and download the Word document. The Word document will then open in a new window, where you can fill out the form and save it.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic