Copy link to clipboard
Copied
Hey all:
I asked my question earlier in the general InDesign section of the forum, but a helpful user suggested I repost it here as it will take some scripting magic to accomplish:
My work assignment of late has been developing an interactive PDF catalog of our products that my superior can distribute digitally and let potential customers browse without accessing the website.
We have an Excel file that lists all the details of our products - name, description, title, image, category, etc. I have used Data Merge to create this 300 page document rather than hand-copy each product's information to a single page.
Unfortunately I am now stuck - I have designed the catalog in such a way that I have an image that I want to make a button which, if the person wishes to purchase a product, will take them directly the the product page online where he or she can add it to the shopping cart. This is great, but I cannot seem to find a way to make the image button's link a variable as the rest of the page content. Links to each product page are included in the CSV file, but without a variable web link method, I would have to create the unique links individually, which kinda defeats the purpose of using Data Merge anyway.
So my question is this - is there any way to make a URL button (an image) have a web link function that can read from a CSV file and change each page like other imported content? If not, is there another way to automate the individual link process without setting it up on each generated page?
Thanks in advance,
Asher
1 Correct answer
If you were using the aformentioned code to check the script label, it would have to go inside the for (i) loop, replacing the "b = p.buttons[0]" line. Though there was a typo because I set t to the button and instead I should have set b to the button.
Yes, a group. If you know that there is only one group on the page, then you don't even have to loop over the groups. Instead you can just use:
t = p.groups[0].textFrames[0];
b = p.groups[0].buttons[0];
Of course, that'll break if there's ever more th
...Copy link to clipboard
Copied
HI, were you able to solve for this?
Please guide me if you have. Thanks.
Copy link to clipboard
Copied
This discussion is more than 13 years old. Please start a new one.
I'm locking this to avoid any further confusion.

-
- 1
- 2