Copy link to clipboard
Copied
Hello,
I am looking for an extendScript syntax for Indesign that can insert the text "PageHeader" in a paragraph of each page. My document is long and all the blocks are linked. The purpose is to transform them into ID for an index match via a VBA under word. I usually place this text one by one. This syntax would make my job easier. If anyone can help me. Thank you
Moving from Using the Community (which is about the forums) to the correct forum... Mod
To ask in the forum for your program please start at https://community.adobe.com/
The following snippet will add the text at the start of the first paragraph. To run it select the textframe in which you want to add the text
var tf = app.selection[0]
tf.paragraphs[0].insertionPoints[0].contents = "PageHeader "
To change the position of insertion you can change the index of the insertionPoints collection.
-Manan
Copy link to clipboard
Copied
Hi @Thierry Poulet,
Some questions
-Manan
Copy link to clipboard
Copied
Hello Manan and thank you for your help,
Mon texte doit-ĆŖtre positionnĆ© n'importe oĆ¹ dans le premier paragraphe du bloc. Ce texte va ĆŖtre transformĆ© en <span class="index" href="#index_0xxx"></span> donc invisible.
Thierry
Copy link to clipboard
Copied
The following snippet will add the text at the start of the first paragraph. To run it select the textframe in which you want to add the text
var tf = app.selection[0]
tf.paragraphs[0].insertionPoints[0].contents = "PageHeader "
To change the position of insertion you can change the index of the insertionPoints collection.
-Manan
Copy link to clipboard
Copied
Super !
Merci beaucoup pour ton aide. Je vais tenter avec Ƨa de faire une boucle afin d'automatiser la procƩdure.
Je t'envoie le rĆ©sultat dĆØs que j'aurais fini.
Encore merci
Amicalement
Thierry