Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Long Documents / April 2004

Tip: Looking for answers? Try searching our database.

automating changes to "Style for following paragraph"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john gibb - 21 Apr 2004 19:16 GMT
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, assume the "following paragraph" styles 's2' and 's3' are the
names of styles that follow 'Heading 2' and 'Heading 3' styles,
respectively.

I change styles now with keyboard macros, but have to go through the entire
document and invoke the macros where I want the styles to be changed.

Is there a way to further automate so, if I change say, a 'Heading 2' to a
'Heading 3', the "Style for following paragraph" can be changed from 's2' to
's3'?

thanks,

-john
Charles Kenyon - 21 Apr 2004 21:38 GMT
The style for following paragraph does change automatically. That applies to
paragraphs you create by pressing Enter at the end of your paragraph. It
does not apply to existing paragraphs. The problem is that you want to have
it magically apply to existing paragraphs and it won't.

You can semi-automate the process using Replace and replacing one style s2
with s3. This will still require you to make a decision as to each paragraph
s2 but is quicker than manually applying the style.

You could also add keyboard shortcuts for your s2 and s3 styles so that you
could apply them from the keyboard.
Signature


Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Hi,
>
[quoted text clipped - 16 lines]
>
> -john
john gibb - 21 Apr 2004 22:34 GMT
Hi Charles,

I appreciate your reply, but after thinking about it a bit more, I am
wondering if this might be possible in VBA, with this sort of algorithm:

for (i = 1 to 9)
   if (paragraph.style="Heading " + i)
       skip-to-next-paragraph
       paragraph.style.set ("s"+ i)

??

My VBA skills are wanting, but maybe a VBA expert can chime in here.

thanks,

-john

> The style for following paragraph does change automatically. That applies to
> paragraphs you create by pressing Enter at the end of your paragraph. It
[quoted text clipped - 29 lines]
> >
> > -john
Charles Kenyon - 21 Apr 2004 22:56 GMT
Yes, you could do something like that, but what about the second paragraph
following the heading style, the third, the twenty-seventh? Yes, you can
program for this but it isn't going to be simple. Somewhat simpler would be
to make the original change using a program that also changed any following
paragraphs until the next heading style was encountered. I'm not going to
attempt either, though.
Signature


Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Hi Charles,
>
[quoted text clipped - 54 lines]
> > >
> > > -john
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.