Extra carriage return character in table

J

Jan

I compile a lot of reports with photographs. I insert them in tables,
as Suzanne and Graham have explained so many times on this forum. My
problem is that, when I add a caption to the image, Word obviously
inserts a carriage return (do they still call it that?) or "enter" sign
at the en of the caption. The little star that indicates the end of the
cell then moves to a next line, adding additional white space in my
document. If I delete the enter sign, I have to re-apply the "Caption"
style to the caption. This seems an unnecessary action to take for
every image. Any advice?
 
R

Robert M. Franz (RMF)

Hi Jan
I compile a lot of reports with photographs. I insert them in tables,
as Suzanne and Graham have explained so many times on this forum. My
problem is that, when I add a caption to the image, Word obviously
inserts a carriage return (do they still call it that?) or "enter" sign
at the en of the caption. The little star that indicates the end of the
cell then moves to a next line, adding additional white space in my
document. If I delete the enter sign, I have to re-apply the "Caption"
style to the caption. This seems an unnecessary action to take for
every image. Any advice?

Is the caption in the same table cell or in its own below?

If the former: prepare the table cell in advance so it already contains
two paragraphs, the first in your desired picture style, the second
already in Caption. If the latter, simply prepare the caption cell to be
formatted with caption style. That might not fix the extra CR, but the
different style when you delete it.

To get rid of the extra line spacing entirely, the quickest way would
probably be to define an AutoText-Entry containing the SEQ-field you
need for your caption, and insert that AutoText instead of using Insert
.... Caption.

HTH
Robert
 
J

Jan

Thank you, Robert. I usually put it in the same cell, because that is
what Word does by default if you use right-click and 'Caption'. I will
have to study Autotext and SEQ first, because I have not used it much
previously. Will check it out and see if it works!
 
R

Robert M. Franz (RMF)

Jan said:
Thank you, Robert. I usually put it in the same cell, because that is
what Word does by default if you use right-click and 'Caption'. I will
have to study Autotext and SEQ first, because I have not used it much
previously. Will check it out and see if it works!

For a start, while looking at one of your existing captions, hit ALT-F9
to display field codes.

HTH
Robert
 
A

Al

I compile a lot of reports with photographs. I insert them in tables,
as Suzanne and Graham have explained so many times on this forum. My
problem is that, when I add a caption to the image, Word obviously
inserts a carriage return (do they still call it that?) or "enter" sign
at the en of the caption. The little star that indicates the end of the
cell then moves to a next line, adding additional white space in my
document. If I delete the enter sign, I have to re-apply the "Caption"
style to the caption. This seems an unnecessary action to take for
every image. Any advice?

Here is a macro to remove the carriage return on the last line of a cell
(and the cell marker is on the next line) causing an extra blank line.

Sub TableLast()
'
' TableLast Macro
' Macro created 8/20/2006 by
'
Dim tableLoop As Table
Dim cellLoop As Cell
For Each tableLoop In ActiveDocument.Tables
For Each cellLoop In tableLoop.Range.Cells
While Right(cellLoop.Range.Text, 3) = Chr(13) & Chr(13) & Chr(7)
cellLoop.Range.Characters.Last.Previous.Delete
Wend
Next cellLoop
Next tableLoop

End Sub
 
G

Graham Mayor

Insert a caption. Select it - format > style > modify (Caption style)
Change the 'space after' paragraph spacing from the default to what you
require (probably 0) to give the spacing you require. Check add to template
on your way out of the dialog.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jan

Thank you all for your advice. I do not have the time currently to
investigate them all properly, but will certainly do so in future. I
have found a workable solution for the mean time. I found that if I
place the cursor before the end of cell marker and use backspace in
place of delete to remove the line break (carriage return character) it
does not remove the format/style from the caption. It saves me having
to select the whole caption again and re-applying the style.
Regards
Jan
 

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