Different font size in a one line footer 
Author Message
 Different font size in a one line footer

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



Mon, 28 Mar 2005 00:36:26 GMT  
 Different font size in a one line footer
Hi Alex,

Try:
    ActiveDocument.Sections.First.Footers.Item(1).Range.InsertAfter pageNo

Hope this helps,
regards,
Astrid

So that all can benefit from the discussion, please post all follow-ups to the newsgroup.
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



Fri, 01 Apr 2005 20:22:58 GMT  
 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

>.



Sat, 02 Apr 2005 21:58:03 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to PRINT different size and font on the printer at the SAME line

2. Printing with different fonts and sizes on same line

3. 3 different footers in one document

4. VBA to change Footer Format - Fonts, Size, Bold etc

5. controling font size in footer macro

6. Resizing Footer font size

7. Windows Display Font Sizes Vs. Application Font Sizes

8. Printing a Bitmap with a specific font size On print Font size incorrect

9. Total chaos when using different font-size

10. Change size, font, and font size of input boxes

11. Consistent forms with different display font sizes.

12. Font Size at Different Resolutions

 

 
Powered by phpBB® Forum Software