View Single Post
  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mail Merge and paragraph formatting

Hi Peter,

The original test would have been on a 32-bit version of Vista (I cannot
confirm that it was SP2 at the moment, but would be very surprised if it was
not) and Word 2007 (also almost certainly SP2 (but I cannot confirm at the
moment)

I have just retested on a machine running Word 2007 SP2 under Windows 7,
with an Excel 2010 data source (while I retained Word, I dumped the rest of
Office when I installed 2010) and using the same field construction I get
the expected result with one minor exception (which I had also experienced
on the other installation)

That is that the result of the first field in the first record appears as
follows (here, I have manually inserted carriage returns and tabs to show
the result

Line 1: On the Insert tab, the galleries include items that are designed to
coordinate with the

overall look of your document. You can use these galleries to insert
tables, headers,
footers, lists, cover pages, and other document building blocks.
When you create
pictures, charts, or diagrams, they also coordinate with your
current document look

Note that there is an empty "line" between the first and second lines.
There is however no carriage return or new line "character" after the "the"
at the end of the first line and according to the Paragraph Format dialog,
the paragraph is formatted with single line spacing.

If I change the line spacing in the Format Paragraph dialog from Single to
Double and then back to Single again, this mystery space disappears. If I
click undo to undo both instances of the paragraph formatting, the mystery
line does not re-appear.

If instead of using the Paragraph formatting dialog, I place the selection
after the word "the" at the end of the first line and press delete, the
first letter of the first word on the next line is deleted. Likewise, if I
place the selection after the word "the" at the end of the first line and
press the right arrow key, the selection moves the after the first letter of
the first word on the next line.

Apart from this anomaly with the result of the first field of the first
record, all of the other paragraphs are formatted with the required hanging
indent.

--
Regards.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Peter Jamieson" wrote in message
...
Can we compare versions?

Here, I'm using Vista 32-bit SP2, Word 2007 SP2


Peter Jamieson

http://tips.pjmsn.me.uk

On 22/02/2010 06:19, Doug Robbins - Word MVP wrote:
The following field construction

{ IF { MERGEFIELD Line1 } "" "Line 1: { MERGEFIELD Line1 }¶
" "" }{ IF { MERGEFIELD Line2 } "" "Line 2: { MERGEFIELD Line2 }¶
" "" }{ IF { MERGEFIELD Line3 } "" "Line 1: { MERGEFIELD Line3 }¶
" "" }¶

where ¶ represents a carriage return, with each of those paragraphs
formatted with the hanging indent provides the desired result in Word
2007 here.

Copying and pasting the result into a plain text email message, the
indents are lost, but in the word document each of the paragraphs
starting with the word "Line" has a hanging indent.

Line 1 On the Insert tab, the galleries include items that are designed
to coordinate with the overall look of your document. You can use these
galleries to insert tables, headers, footers, lists, cover pages, and
other document building blocks. When you create pictures, charts, or
diagrams, they also coordinate with your current document look.
Line 2 You can easily change the formatting of selected text in the
document text by choosing a look for the selected text from the Quick
Styles gallery on the Home tab. You can also format text directly by
using the other controls on the Home tab. Most controls offer a choice
of using the look from the current theme or using a format that you
specify directly.
Line 3 To change the overall look of your document, choose new Theme
elements on the Page Layout tab. To change the looks available in the
Quick Style gallery, use the Change Current Quick Style Set command.
Both the Themes gallery and the Quick Styles gallery provide reset
commands so that you can always restore the look of your document to the
original contained in your current template.
Line 2 You can easily change the formatting of selected text in the
document text by choosing a look for the selected text from the Quick
Styles gallery on the Home tab. You can also format text directly by
using the other controls on the Home tab. Most controls offer a choice
of using the look from the current theme or using a format that you
specify directly.
Line 3 To change the overall look of your document, choose new Theme
elements on the Page Layout tab. To change the looks available in the
Quick Style gallery, use the Change Current Quick Style Set command.
Both the Themes gallery and the Quick Styles gallery provide reset
commands so that you can always restore the look of your document to the
original contained in your current template.
Line 1 On the Insert tab, the galleries include items that are designed
to coordinate with the overall look of your document. You can use these
galleries to insert tables, headers, footers, lists, cover pages, and
other document building blocks. When you create pictures, charts, or
diagrams, they also coordinate with your current document look.
Line 3 To change the overall look of your document, choose new Theme
elements on the Page Layout tab. To change the looks available in the
Quick Style gallery, use the Change Current Quick Style Set command.
Both the Themes gallery and the Quick Styles gallery provide reset
commands so that you can always restore the look of your document to the
original contained in your current template.
Line 1 On the Insert tab, the galleries include items that are designed
to coordinate with the overall look of your document. You can use these
galleries to insert tables, headers, footers, lists, cover pages, and
other document building blocks. When you create pictures, charts, or
diagrams, they also coordinate with your current document look.
Line 2 You can easily change the formatting of selected text in the
document text by choosing a look for the selected text from the Quick
Styles gallery on the Home tab. You can also format text directly by
using the other controls on the Home tab. Most controls offer a choice
of using the look from the current theme or using a format that you
specify directly.

In the data source, record one contained data in all three fields, in
record 2, the Line 1 field was empty, in record 3, the Line 2 field was
empty and in Record 4, the Line 3 field was empty.