Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Apply Para Keep With Next command to two adjacent styles?
I have a long document with many images and captions below the images.
Sometimes due to page layout, the captions spill onto the next page without the image. To fix this, I select the caption and image and apply the Para Keep With Next command. This locks them together on the same page. I would like to automate this with a macro. All my images are in one style (image) and all the captions are in another style (caption). Is it possible to create a macro that says, find all instances where the caption style is adjacent to the image style, and apply the Para Keep With Next command? |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Apply Para Keep With Next command to two adjacent styles?
If you make sure to always apply the €śimage€ť style to your image paragraphs,
you do not need a macro but only a small but important modification of the image style: Modify the _style definition_ of the image style to €śKeep with next€ť (via Paragraph Line and Page Breaks tab). This will force every paragraph with the image style to be on the same page as the following paragraph (i.e. the caption). You should not apply "Keep with next" to the caption style or any caption paragraphs since it will force the caption paragraph to be on the same page as the following paragraph. This may result in an image and caption being moved the the next page even if there is room for both on a page. To remove this setting from existing captions, you can use Find and Replace (More button Format Paragraph - search for paragraphs with caption style and "Keep with next", replace by "Don't keep with next"). -- Regards Lene Fredborg DocTools €“ Denmark www.thedoctools.com Document automation €“ add-ins, macros and templates for Microsoft Word "Tom" wrote: I have a long document with many images and captions below the images. Sometimes due to page layout, the captions spill onto the next page without the image. To fix this, I select the caption and image and apply the Para Keep With Next command. This locks them together on the same page. I would like to automate this with a macro. All my images are in one style (image) and all the captions are in another style (caption). Is it possible to create a macro that says, find all instances where the caption style is adjacent to the image style, and apply the Para Keep With Next command? |
#3
Posted to microsoft.public.word.tables
|
|||
|
|||
Apply Para Keep With Next command to two adjacent styles?
Thanks Lene. That works well and is much easier to implement.
|
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Apply Para Keep With Next command to two adjacent styles? | Tables | |||
Apply Para Keep With Next command to two adjacent styles? | Tables | |||
Apply Styles Sheet as per User needs in Word Documents | Microsoft Word Help | |||
Style lists in the Styles and Formatting task pane | Formatting Long Documents | |||
Custom Styles Questions | Microsoft Word Help |