Adding hyperlinks to InDesign from Excel
Copy link to clipboard
Copied
I am creating a book listing in Adobe InDesign, where each book title needs a hyperlink assigned. I copy the links from Excel to InDesign using **Window > Interactive > Hyperlink**. Can someone help me automate this process, possibly with a script? Thanks!
Copy link to clipboard
Copied
Script will only work if you've both lists "synchronised".
I can't provide you with a working script - I'm not so good in JavaScript - but if you send me your file privately - I can do this for you for free, using a different solution - please click my nickname, pack just your INDD file and Excel file, upload this package somewhere and send me a link privately.
Or do you have book name AND hyperlink in the Excel file - in separate columns?
Copy link to clipboard
Copied
Hi Robert,
Thanks for taking the time to respond. I’ve created a dummy version since the file is confidential. To answer your question, I have the book name and hyperlink in the Excel file. Thank you very much!
https://limewire.com/?referrer=pq7i8xx7p2
Copy link to clipboard
Copied
Hi Robert,
Thanks for taking the time to respond. I’ve created a dummy version since the file is confidential. To answer your question, I have the book name and hyperlink in the Excel file. Thank you very much!
https://limewire.com/?referrer=pq7i8xx7p2
By sxorNOJ
Unfortunately, there is nothing to download?
Copy link to clipboard
Copied
Let me put it here: https://limewire.com/?referrer=pq7i8xx7p2.
It's good on my end when I click the link. Please let me know if you were able to access it. Thanks!
Copy link to clipboard
Copied
Sorry, here's the correct link https://we.tl/t-OrSlNsPxUf
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Processed INDD and PDF attached.
Unfortunately, you are on a Mac so you won't be able to use my paid solution - but I can process your file for you for free.
Copy link to clipboard
Copied
I really appreciate your help! The solution makes sense, but unfortunately, I’m on a Mac, so I can’t use it. Still, thanks a lot for taking the time to respond!
The project comes in monthly with around 500 book titles that each need to be assigned a URL. Currently, I copy the URL from Excel and paste it into InDesign via the Hyperlinks tab, which involves a lot of back and forth.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
@Robert at ID-Tasker
The catalog needs to be printed and mailed, so we have to make sure the total number of pages is divisible by four for pre-press printing. The layout follows a set template, though some titles include book images, adding a bit of complexity. In the final stage, we’ll be exporting it as an interactive PDF, so each book title needs to have a URL linked to it.
Copy link to clipboard
Copied
Maybe it would be "too much" but how about QR codes?
And what will be the final layout - how many Text Columns?
Maybe this would save you some space?
And if you put URL link as text - most PDF viewers will convert it into a clickable link anyway.
Copy link to clipboard
Copied
Good point! Each book title links to its specific page on our store website for easy access to details and purchasing.
We’re also adding QR codes at the start of each section (e.g., California), followed by related books for quick navigation.
The number of text columns will depend on how we balance readability with fitting all content efficiently. As for URLs in text format, you're right—many PDF viewers automatically convert them into clickable links.
Here's our company website: https://store.lexisnexis.com/en-us/
Copy link to clipboard
Copied
Your website address is quite short - so it shouldn't take too much extra space?
Or, if those titles should link back ONLY to your website - maybe you could make them link by ISBN?
So only one number at the end of the link = short URL?
Then, 301 redirect on your website to the final page.
Copy link to clipboard
Copied
@Robert at ID-Tasker
Do you mean that using ISBN-based URLs would be more easier in terms of creating a script than assigning a unique URL to each book title? The shorter the easier? Sorry I don't know anything about coding or scripting at all.
Here's one example of the actual details laid out in InDesign:
Tax, Estate & Financial Planning for the Elderly: Forms & Practice
Michael Gilfix, David M. English, Rebecca C. Morgan
2 volumes, loose-leaf with downloadable content, updated twice per year, Pub. #00774, ISBN 9780820517742,
eISBN 9781579111427
Copy link to clipboard
Copied
Do you mean that using ISBN-based URLs would be more easier in terms of creating a script than assigning a unique URL to each book title? The shorter the easier? Sorry I don't know anything about coding or scripting at all. [...]
By sxorNOJ
From the scripting point of view - URL in your text, before processing, would be just bunch of characters - so its lenght doesn't matter - if will be removed anyway and used to convert your title into clickable link.
Here's one example of the actual details laid out in InDesign:
Tax, Estate & Financial Planning for the Elderly: Forms & Practice
Michael Gilfix, David M. English, Rebecca C. Morgan
2 volumes, loose-leaf with downloadable content, updated twice per year, Pub. #00774, ISBN 9780820517742, eISBN 9781579111427
That's a long one... not much room for extra URL - in the printed version...
In a "raw" form, before script processing, your text could look like this:
With whatever form of URL your website admin would prefer 😉
https://store.lexisnexis.com/en-us/?isbn=9780820517742
or
https://store.lexisnexis.com/en-us/9780820517742
Then, script can take "#whatever" and convert book's title into a hyperlink using this "#whatever" as an URL.
Copy link to clipboard
Copied
Or script can look for green or red:
and convert only THOSE into hyperlinks?
As long as your website admin will agree to:
https://store.lexisnexis.com/en-us/?isbn=9780820517742
or
https://store.lexisnexis.com/en-us/9780820517742
In THIS CASE - you won't have to change ANYTHING in the way you work 😉
Beside of course, running a script 😉
Copy link to clipboard
Copied
@Robert at ID-Tasker
These are all interesting in terms of what a script can do. However, our company primarily focuses on print. The interactive PDF (digital version) is secondary and is uploaded to the site as a flipbook.
Thank you for all your effort—I really appreciate you taking the time to help!
Copy link to clipboard
Copied
Robert at ID-Tasker
These are all interesting in terms of what a script can do. However, our company primarily focuses on print. The interactive PDF (digital version) is secondary and is uploaded to the site as a flipbook.
Thank you for all your effort—I really appreciate you taking the time to help!
By sxorNOJ
You're welcome.
OK, so you don't have or can't have those hyperlinks from the start?
Because, if you can have them from the start - they can be hidden - 0.1pt, -100 tracking, no color, 1% horizontal scale, etc. - and will NOT affect your printed version in any way - but then, could be used to easily make a digital version.
Copy link to clipboard
Copied
BEFORE - "raw" data:
AFTER - or rather when working on the printed version:
Preview in Story Editor:
It's still there - but invisible - text color set to green and 12pt point size:
Just 1pt:
And 4000% zoom - 0.1pt - still greeen text color:
And Character Color set to [None]:
Exported Interactive PDF - preview in Acrobat:
But in this case - there would be nothing hidden, as at this point, URL will be gone and used to hyperlink title.
And printed PDF - with this hidden URL "still there", in the InDesign - preview in Acrobat:
So what I'm showing is that during export - InDesign is removing this hidden text anyway.
Copy link to clipboard
Copied
I'm on my phone so can't give you working JavaScript code right now, but here is an algorithm:
Task 1 - find all paragraphs with "book title" ParaStyle applied.
Task 2 - run on each found result:
A) get text contents,
B) split by "#",
C) take 2nd result after splitting,
D) select whole paragraph,
E) add hyperlink using stored URL - from point C),
Task 3 - replace all instances of "hidden hyperlink" CharStyle applied to "#url".
Copy link to clipboard
Copied
Just a slightly off-topic note: You can set InDesign's preflight to warn if your page numbers are not divisible by 4 (or whatever number you choose).
Copy link to clipboard
Copied
@Dave Creamer of IDEAS
Thanks for the insight! I mainly use the Pages panel in InDesign to keep track of the number of pages I’m working on. 🙂
Copy link to clipboard
Copied
Or... It would be much easier - even I could write you a simple script in JavaScript 😉 - if you put URL address in your "source" data, right after the title...
Right now, I had to load info from two sources and filter and sort to get them together.
If there would be title + URL together, in the same text line - it would be very easy to write a script, to take the URL and convert title into a Hyperlink.
Copy link to clipboard
Copied
Just to clarify, are you referring to the Excel file or the InDesign file? Appreciate your help!


-
- 1
- 2