How to enable page numbers without affecting footers/headers

我只是一个虾纸丫 提交于 2019-12-12 03:52:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!