I am creating Word documents from an Access database and I am trying to
insert two fields into one line so I thought I could do it with a character
style (NormalBold) but the paragraph style is overriding it
My code is
rngWord.Collapse wdCollapseEnd
With rngWord
.Style = "NormalBold"
.InsertAfter "Tel: " & rs!Clubphone
End With
rngWord.Collapse wdCollapseEnd
With rngWord
.Style = "Normal"
.InsertAfter vbTab
If Not IsNull(rs!Clubfax) Then
.InsertAfter "Fax: " & rs!Clubfax & vbCrLf
Else
.InsertAfter vbCrLf
End If

Any ideas please
--
Regards
Stephen English

Re: Setting a character style by Klaus

Klaus
Fri Feb 09 17:33:13 CST 2007

Hi Stephen,

Instead of

With rngWord
.Style = "NormalBold"
.InsertAfter "Tel: " & rs!Clubphone
End With

try

With rngWord
.Text = "Tel: "& rs!Clubphone
.Style = "NormalBold"
End With

... or some other solution where you keep track of the range of the inserted
text, then apply the style.

Regards,
Klaus