更多相关内容...>>VBA实现word页面设置
VBA实现word页面设置
Sub AutoOpen()
In9Bur http://www.numino.net
Dim glkDoc As Document '定义变量
fNMPQH http://www.numino.net
Set glkDoc = Application.ActiveDocument '设置为当前文档
1k1ECi http://www.numino.net
With glkDoc '设置文档参数
friB4Y http://www.numino.net
With .PageSetup '设置【页面设置】参数
vSIDJO http://www.numino.net
.Orientation = wdOrientPortrait '页面方向:wdOrientPortrait--纵向,wdOrientLandscape--横向
7PY50r http://www.numino.net
.PageWidth = CentimetersToPoints(21) '纸张宽21cm
YcW41w http://www.numino.net
.PageHeight = CentimetersToPoints(29.7) '纸张高29.7cm
S0YKj7 http://www.numino.net
.TopMargin = CentimetersToPoints(2) '上边距2cm
2636pG http://www.numino.net
.BottomMargin = CentimetersToPoints(1.5) '下边距1.5cm
gWpdw3 http://www.numino.net
.LeftMargin = CentimetersToPoints(2.5) '左边距2.5cm
i04NHg http://www.numino.net
.RightMargin = CentimetersToPoints(1.5) '右边距1.5cm
Rquo2q http://www.numino.net
.HeaderDistance = CentimetersToPoints(0.5) '页眉0.5cm
VCx37K http://www.numino.net
.FooterDistance = CentimetersToPoints(0.5) '页脚0.5cm
vZ6WX3 http://www.numino.net
End With '结束【页面设置】参数设置
dhMAD8 http://www.numino.net
.Save '保存文档参数
rNKRm5 http://www.numino.net
End With '结束文档参数设置
LmKdI9 http://www.numino.net
End Sub
更多相关内容...>>VBA实现word页面设置

Bug报告 |  免责声明 |  联系我们 |  加入收藏

Copyright © 2006 NuminoStudio(www.numino.net) All Rights Reserved