
Different font size in a one line footer
Thanks Astrid,
Finally I figured out the solution. Actually the input
document was created from a template, so the page numbers
have been set up with different font type and size.
Instead of tweaking the page number setting in VB, I just
insert this scripts:
addPage.Sections.First.Footers.Item(1).PageNumbers.Add
addPage.Sections.First.Footers.Item
(1).Range.InsertBefore "TL1-"
The text "TL1-" will have font type vary to the one for
footer text.
Alex
Quote:
>-----Original Message-----
>Hi Alex,
>Try:
> ActiveDocument.Sections.First.Footers.Item
(1).Range.InsertAfter pageNo
Quote:
>Hope this helps,
>regards,
>Astrid
>So that all can benefit from the discussion, please post
all follow-ups to the newsgroup.
Quote:
>Visit the MVP Word FAQ site at http://www.mvps.org/word/
Quote:
>> Hi there,
>> I tried to apply different font size in a one line
>> footer. Below is part of the script. The last script
>> (pageNo) will always overwrite the previous text (that
is
>> File1.. etc). I know I have to add some command like
>> insertAfter or something, but I have wasted hours to
find
>> the magic combination. Please help and thank you.
>> Script:
>> 'This part is OK
>> addPage.Sections.First.Footers.Item(1).Range.Text =
File1
>> & "-tl" & Unit1 & ".doc" & " "
>> With addPage.Sections.First.Footers.Item(1).Range
>> .Font.Size = "9"
>> .Font.Name = "Helvetica-Narrow"
>> End With
>> 'Here is my problem ...
>> addPage.Sections.First.Footers.Item(1).Range.Text =
pageNo
>.