Hello,
It’s my first topic here, I’m french so sorry for the english mistakes.
I’m searching for a solution to add prices to a product catalogue (that I create) according to a database (Excel, edit by somebody else).
Datamerge is not really a good way to do it, cause I want to update frequently the prices while I create my document, while I move all objects, and the database and the number of products can usually be updated.
I finally turn my attention to the javascript. Yet it seems to me this tool could make me enjoy in operating indesign.
I really know nothing with javascript, so I’ll try to learn javascript based on existing scripts.
And perhaps you could help me.
The xls I receive has 3 columns : reference (6 numbers), price and currency.
Here’s what I want to achieve:
1 ? opening a dialog box to choose the xls (= database containing “reference”, “price” and “currency”, completed by a third party)
2 ? Research in InDesign 6 numbers in my paragraph style “referencePrice” (GREP)
3 ? searching for these 6 numbers in the database
4 ? replacing the whole paragraph selected in indesign by the complete line of database
5 ? repeat for each 6 numbers found in indesign
The design format of the reference price and the currency would automatically be created using nested styles.
I feel like I’m too much bad in javascript, so if you have any suggestions to help me move forward, or to make me back down :) , I’m interested.
Thank a lot to all.