I select X number of paragraphs in Word and want to activate a macro that performs the same action on each paragraph. The action is adding a style separator before the first period in each paragraph and then applying 2 styles, 1 before the period and one after.
I know how to write this code. However, I've spent hours trying various chunks of code to repeat this process on each of the selected paragraphs, with no luck.
I think the Selection.Paragraphs.Count may help me, in that it gives me the number of paragraphs selected, but I don't know how to incorporate it in my VBA to repeat my process X number of times, X being the number of paragraphs selected.
for each p in selection.paragraphs
orfor i=1 to selection.paragraphs.count ... selection.paragraphs(i) ...
could help