问题
I am trying to put page numbers on the right hand side on the bottom of the page, but it keeps moving the text of the footer making it off center.
Anyone know how to keep this from happening?
Also, does anyone know how to enable total pages like 3/4. Any help would be appreciated.
Here's what I have so far:
.ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).range.Paragraphs.Alignment = wdAlignParagraphCenter 'Centers Header'
.ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).range.InlineShapes.AddPicture ("C:\Users\pgates\Desktop\ Logo Swoops cropped 2.JPG") 'Calls for image header'
.ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).range.Paragraphs.Alignment = wdAlignParagraphCenter 'Centers Footer'
.ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).range.Text = " rwetwet" & vbCr & "wetrwet" & vbCr & "Phone:wertttr"
.ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers.Add
回答1:
There is no such thing in Microsoft Word as "enabling" page numbers. You can design your footer freely. It seems you look for something like in Microsoft Excel or PowerPoint but it just works different in Microsoft Word.
Personally I would
- insert a table into the footer area with two or three columns
- and a transparent border to it
So you'll be able to enter your page numbers on the right side, while your other text in the footer stays on the left side (or middle depending on columns).
___________________ ________________________ ___________
|_Your footer text__|_Center part if needed__|_Page X/Y__|
Update
Have a look at your other question. I've put an answer there.
来源:https://stackoverflow.com/questions/45037091/how-to-enable-page-numbers-without-affecting-footers-headers