Apply Para Keep with Next command to two items automatically?

T

Tom

Is it possible to apply the Para Keep with Next command to two items of
the same style automatically?

For example, I have a long Word document with numerous images and
captions below the images. The images and captions should always be
together, but sometimes due to page layout, the caption spills onto the
next page without the image.

Captions are always in one style ("Caption").
Images have another style ("Body Text 2").

I would like to somehow create a maco that says, find all instances
where the caption style and the Body Text 2 style are right next to
each other, and apply the Para Keep With Next command to both of them.
Is that possible, or am I dreaming?

Tom

(Sorry, I know this isn't a table question, but I didn't know what
other forum to ask this in.)
 
S

Suzanne S. Barnhill

You don't want KWN to apply to both styles, only the image (if the caption
is beneath it). Otherwise both image and following caption will spill to the
next page whenever there is not room for them *and* the following text
paragraph. No macro is needed; the way to make this happen "automatically"
is to modify the Body Text 2 style to include the "Keep with next" property.
See http://www.shaunakelly.com/word/styles/ModifyAStyle.html for the general
principles; in the Modify Style dialog, click Format, then Paragraph, then
check "Keep with next."

FWIW, a more appropriate NG for this question would be
microsoft.public.word.pagelayout.
 
T

Tom

I didn't realize such a simple fix would actually work, but I just
tried it and it did. Thanks Susan.

Also, I was unaware of the page layout forum. I'll subscribe to that.

Sorry for the duplicate posts -- I kept getting a server timed out
error, and didn't realize it had posted.

Thanks for your help.

Tom
 
S

Suzanne S. Barnhill

Sorry for the duplicate posts -- I kept getting a server timed out
error, and didn't realize it had posted.

That seems to happen a lot, though usually in the Communities forum.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top