The trouble you're having is caused by applying all your insertions
and style changes to the *entire* footer.
You need to define a separate Range object, and make it correspond to
only the piece of the footer that you're currently working on. You do
this by collapsing the Range object to the end of the footer,
inserting the next piece of text, and applying the character style or
other formatting.
I think this will do what you intended:
Dim myRg As Range
Set myRg = _
ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).Range
With myRg
.Text = "Name" & vbTab
.Style = ("FooterBold")
.Collapse wdCollapseEnd
.Text = "Address" & vbTab
.Style = ("FooterPlain")
.Collapse wdCollapseEnd
.Text = "Printed on recycled paper"
.Font.Size = 6
End With
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
>I have to put a line of text in a footer which has three different character
>styles with three different sets of text. They all work on their own, but
[quoted text clipped - 23 lines]
>
>Sol
Sol Apache - 07 Dec 2006 21:51 GMT
Thank you very much, this works a dream.
I haven¹t encountered the collapse command in VB before. Usually this word
brings to mind English cricketers batting against Australia.
Thanks again
Sol
On 6/12/06 03:04, in article fgccn211no02o5hmeai3p88gm5mpokaibv@4ax.com,
> The trouble you're having is caused by applying all your insertions
> and style changes to the *entire* footer.
[quoted text clipped - 58 lines]
>>
>> Sol