Using InDesign CS2:
I am trying to apply “space before” to just the paragraphs within a selected line(s) of text. The issue I am having is that I can’t figure out a way to target just those paragraphs within a selected group of text within a text frame.
For example: If I use the cursor and highlight the first 3 lines (of the 7 lines below) with my Text tool, I would want the script to apply the space before to just paragraph “example line 1”, “example line 2”, “example line 3”.
example line 1
example line 2
example line 3
example line 4
example line 5
example line 6
example line 7
My script is not working, but it is close. It targets all the paragraphs instead of just the selected paragraphs.
Any help would be greatly appreciated.
Thanks in advance.
-Jeff
tell application "Adobe InDesign CS2"
set theSelection to (get selection)
set theStory to parent story of item 1 of theSelection
tell document 1
set theSpace to get space before of object reference of paragraph 1 of theStory as number
set space before of object reference of paragraphs of theStory to theSpace + "1"
end tell
end tell