I'll give that a try and let you know. I think part of the problem may be
that the docvariable is inside a Word table. If I use the docvariable
outside the table, it displays correctly.
> > Still no luck. I'm using Word 2003 SP2. When I tried the code you
> > suggested, I still get the same results. For example if I type Bill (press
[quoted text clipped - 17 lines]
>
> See what you get.
> I'll give that a try and let you know. I think part of the problem may be
> that the docvariable is inside a Word table. If I use the docvariable
> outside the table, it displays correctly.
I do not know why... But in a table make sure you have a "real" ¶ at the end
of the DOCVARIABLE field. If that screws up the formatting, format that ¶ and
the following cell marker ¤ to a size of 1.
Here is another method that I have resorted to when I did not want to have a
paragraph mark after the last entry.
Dim CC As String
If txtCC.Text <> "" Then
strCC = txtCC.Text
With .Bookmarks("CC").Range.Rows(1).Cells(2).Range
If InStr(strCC, Chr(13)) = 0 Then
.InsertAfter strCC
Else
i = 1
Do While InStr(strCC, Chr(13)) > 0
If i = 1 Then
.InsertAfter Left(strCC, InStr(strCC, Chr(13)) -
1)
strCC = Mid(strCC, InStr(strCC, Chr(13)) + 2)
i = 2
Else
.InsertAfter vbCr & Left(strCC, InStr(strCC,
Chr(13)) - 1)
strCC = Mid(strCC, InStr(strCC, Chr(13)) + 2)
End If
Loop
.InsertAfter vbCr & strCC
End If
End With
End If

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> I'll give that a try and let you know. I think part of the problem may be
> that the docvariable is inside a Word table. If I use the docvariable
[quoted text clipped - 25 lines]
>>
>> See what you get.
Jean-Guy Marcil - 12 Mar 2008 14:06 GMT
> Here is another method that I have resorted to when I did not want to have a
> paragraph mark after the last entry.
But this would not work with a DOCVARIABLE field (that the poster is using),
right?
Doug Robbins - Word MVP - 12 Mar 2008 23:26 GMT
That's correct.
I came up with the method when engaged on a job to modify some templates
created by some consultants (whose name I shall not mention) in the UK who
inserted information/constructed tables in the document by setting a range
variable to the .Range of the document, then collapsing it and inserting
what they wanted then repeating the process. For some reason, when I tried
to change the line spacing of the empty paragraph inserted after the
docvariable field, it had a detrimental effect on other parts of the
document that had been built by their code.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>> Here is another method that I have resorted to when I did not want to
>> have a
[quoted text clipped - 3 lines]
> using),
> right?