Does anybody happen to know how to use Word to insert a hyperlink to a URL, where the URL is a field that can be used by docs generator?
For background, I have been happy to generate PDFs using docs generator as an integration in one of my business apps. I have about 20 fields that have successfully imported into my template. However, I would also like to import up to five website links that become live links in the PDF.
I created the original Template using Word with curly brackets around the respective fields. Initially, I assumed I could simply right mouse click on some text (Click here) and define a hyperlink e.g. a URL by simply putting curly brackets around the website address however, Word does not retain the curly brackets once the URL has been defined.
Hi @Simon_Hill, indeed a URL set in Google Docs is preserved when the text is replaced. Please define your Google Doc and set the URL on the variable in curly brackets (right click, insert link and then a valid URL). Iāve just tested this again and it works well. Please note that this is static currently, meaning the URL canāt be changed from Glide, but is āhard codedā into the template.
Thanks for using DocsAutomator and let me know if you have any other questions!
Ok thanks for responding. I donāt actually go all the way and try generating the PDF since the curly brackets seemed to disappear as I was developing the template (replaced by other characters) - but happy to try.
Adding a link on the placeholder will work and the placeholder itself wonāt disappear. Feel free to reach out in the DocsAutomator chat as well in case of more questions!
I have tried this multiple times and it does not work.
I have confirmed I can add a fixed link, for example a āClick meā with a hyperlink to a BBC website. That works fine with DocsGenerator. But as soon as I replace the address in the Word template with ā{{link1}}ā where link1 is the Glide URL column the resulting PDF does not generate the link.
I inspected the Word doc hyperlink and I see that everytime, Word has replaced the curly brackets with some symbols.
Hi @Simon_Hill, DocsAutomator needs Google Docs for templates, not Word. How do you connect Word to DocsAutomator? Are you uploading a Word file to Google Drive? Cheers, Rupert
I think you might find that itās not. When you upload a Word file to a Google Drive, Google will allow you to view and edit the file, but it doesnāt convert it. Thatās something you have to do deliberately. If you open the file once itās uploaded and then look in the File menu, you should see an option to āSave as Google Docā. When you choose that option, a copy of your Word file is created in Google format, and the original is left intact.
@Simon_Hill Thanks. As @Darren_Murphy said, you will have to convert to a Google Doc in a next step. Hyperlinks will then need to be inserted in Google Doc as they may not be preserved from Word (please check). As mentioned above, I tested with adding hyperlinks in Google Docs and that works well.
I think I didnāt describe the process exactly. What I do is open an existing file in Google docs. I think click on File open. It that allows the option to upload a file from iPad. I select the Word template. Google docs then automatically converts it into a Google Doc and automatically saves it in my Google docs.
This has worked perfectly on until now with over 20 fields used in the Word template that successfully carried over to the Google Doc and worked with DocsGenerator/Glide.
The issue is really with Word. When you create the field in the hyperlink URL dialogue box, it doesnāt keep the curly brackets and then the whole process described above goes wrong.
Rupert implies I shouldnāt be using Word to create the template in the first place, which is a pity since our work platform is Microsoft. I just go the last 10 yards by using my iPad as described above. I guess would have to take Rupertās advice and create the links in Google docs too.
So I just tried to enter a field in Google Docs, e.g. I highlighted āClick hereā and selected Edit link. This opened the dialogue box with which to enter the URL. Instead of the URL of course I entered {{link1}}. However, Google Docs throws up the error āInvalid linkā.
I am beginning to think this approach will not work with Google Docs either. Any tips?
Sorry to harp on this, but Iām not convinced.
Just humour me for a minute - open your document in Google and check at the top left. Do you see a āDOCXā tag (or similar) like is shown below?
Really appreciate the support and of course, happy to check. I can confirm that the icon is the Google Docx icon and NOT the Word icon (viewing the list as per your second screenshot). When I open it there is no .DOCX extension⦠maybe because the title CTSM DataSetup template is too long to display everything⦠but once again, the icon is the Google Docs icon next to the document name and top left corner. It is NOT a MS Word icon.
Hi @Simon_Hill, please see my original reply. The important part here is that support is offered for static hyperlinks only currently. Youāre trying to insert a variable as a link, which isnāt working / supported. Currently only static links (meaning the link will always be the same, canāt be changed dynamically) can be added and will be maintained in printed PDFs.