J
john gibb
Hi,
I frequently change Outline levels in long documents and have setup
specific, and different, styles for what follows my Headings. (Different
indentation is one reason I do this)
For example, 's2' and 's3' are the names of styles that follow 'Heading 2'
and 'Heading 3' styles, respectively.
Now I change styles with keyboard macros, but have to go through the entire
document and invoke the macros after visually noting where I want the styles
to be changed.
Is there a VBA way to further automate this so, if I change 'Heading 2' to
'Heading 3', the "Style for following paragraph" can be changed from 's2' to
's3'?
My VBA skills are wanting but am wondering if this might be possible an
algorithm like:
<clip>
do while not end-of-file
for i=1 to 9
if (paragraph.style="Heading " + i)
skip-to-next-paragraph
if Left(paragraph.style,8) <> "Heading "
paragraph.style.set ="s"+ i
else
skip-to-next-paragraph
end if
next
end do while
<clip>
??
thanks,
-john
I frequently change Outline levels in long documents and have setup
specific, and different, styles for what follows my Headings. (Different
indentation is one reason I do this)
For example, 's2' and 's3' are the names of styles that follow 'Heading 2'
and 'Heading 3' styles, respectively.
Now I change styles with keyboard macros, but have to go through the entire
document and invoke the macros after visually noting where I want the styles
to be changed.
Is there a VBA way to further automate this so, if I change 'Heading 2' to
'Heading 3', the "Style for following paragraph" can be changed from 's2' to
's3'?
My VBA skills are wanting but am wondering if this might be possible an
algorithm like:
<clip>
do while not end-of-file
for i=1 to 9
if (paragraph.style="Heading " + i)
skip-to-next-paragraph
if Left(paragraph.style,8) <> "Heading "
paragraph.style.set ="s"+ i
else
skip-to-next-paragraph
end if
next
end do while
<clip>
??
thanks,
-john