Re: How do you center the text in the footer from vb6 by Doug
Doug
Tue Jul 08 21:05:28 CDT 2003
Hi Mustapha,
As there is by default a centre aligned tab in the footer, you can just use:
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Font.Size =
8
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text = vbTab
& "Some text for footer"
Alternatively,
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Font.Size =
8
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text = "Some
text for footer"
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.ParagraphFor
mat.Alignment = wdAlignParagraphCenter
will align the text without the use of the tab.
Please respond to the newsgroups for the benefit of others who may be
interested.
Hope this helps
Doug Robbins - Word MVP
"Mustapha Amrani" <ma10024@newton.cam.ac.uk> wrote in message
news:beeptr$24o$1@pegasus.csx.cam.ac.uk...
> How do you center the text in the footer.
>
> wrdSelection.Sections(1).Footers(wdHeaderFooterPrimary).Range.Font.Size =
8
> wrdSelection.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text = "Some
> text for footer"
>
> Thanks
>
> M
>
>