• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Does anyone know how to write a GREP to create hyperlinked text

Community Beginner ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

I have a long word document with hyperlinked text and I'm looking for an automated way to create the hyperliked texts in InDesign.

For example:

Here are some suggestions from the Wisconsin Water Librarians, but feel free to swap out with your own or visit our subject specific reading list: Water Birds (https://waterlibrary.aqua.wisc.edu/wp-content/uploads/waterfowl_aug16.pdf).

The words "Water Birds" should be the hyperlinked to the URL follwing it. 

Any ideas? I can figure out how to isolate and change the type style of the hyperlink, but other than cutting and pasting into the interactive menu, I can't figure out a way to transfer the links. Thanks!

TOPICS
Scripting

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

generalyao  wrote

I can figure out how to isolate and change the type style...

All GREP can do is find/replace/apply style. You can get some forms of automated hyperlink generation in PDF export, but not to extent you describe.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

Thanks, John. So there's no way around copying or typing links into the interactive hyperlinks menu?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

John's right, GREP can only find and replace existing text or apply a style to text found using a regular expression. If you have a lot of these to do, a script is the way to go. I'm not a scripter but there are some awesome people on this forum who are and would probably be willing to write a script for a fee. A fee by the way which will save you tons of time moving forward. Good luck!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

I'll move this to the scripting forum for you.

~Barb

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

generalyao  wrote

… The words "Water Birds" should be the hyperlinked to the URL follwing it.

Sorry, but I can see no URL following "water birds" in "Watching water birds" in the PDF.

Where should a script pick up this information?

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

If the Word document already contains the hyperlinks, why do they missing after importing the docx or doc file?

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

Thanks for the reply. I found a macro in word that maintains the hyperlink text and the URL but I need a script to automatically create the hyperlinked word when importing into InDesign. So, it's not a GREP issue after all, it's a scripting issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

Hm. I still do not get it. Sorry.

Can you describe in more detail what the Word file is for? Is this just a list of names where you apply the hyperlinks with a macro? Or will the Word file contain all the text that you want to flow to InDesign and you cannot see a way to place the text on an InDesign page together with the hyperlinks?

Thanks,

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

Kris Coppieters from Rorohiko developed a script that may assist you with this task. Check out his article here: https://www.rorohiko.com/wordpress/use-indesign-find-and-replace-to-assign-hyperlinks-to-text/

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

LATEST

Thanks, Colin. Even with this script, it's out of my league.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines