以下是引用fyyylyl在2024-6-11 15:56:19的发言:
WordApp.Documents(1).Sections(1).Footers(1).PageNumbers.Add.Alignment=4 &&1-中,2-右,3-奇左偶右,4-奇右偶左
加完页码以后,如何控制页码的字号和样式,例如 “─ 1 ─”
我原来是这么做的
Procedure obo_write_Footer()
*!* 页码设置
*objWordApplication.Documents(1).Sections(1).Footers(1).PageNumbers.Add.Alignment = duiqi_footer
objWordApplication.activewindow.activepane.View.seekview = 10
With objWordApplication.Selection
.paragraphformat.Alignment = duiqi_footer
.Font.Size = zihao_footer
.Font.Name = ziti_footer
.typetext(lcSpliteCharacter+" ")
.Fields.Add(.Range,33)
.typetext(" "+lcSpliteCharacter)
ENDWITH
*WordApp.Documents(1).Sections(1).Footers(1).PageNumbers.Add.Alignment = 4 &&0-左,1-中,2-右,3-奇左偶右,4-奇右偶左
objWordApplication.activewindow.activepane.View.seekview = 9
objWordApplication.activewindow.activepane.View.seekview = 0
objWordApplication.activewindow.activepane.View.seekview = 0
Endproc
但是不能实现“奇右偶左”,请多多指教,这个我也是好久不能解决的问题