更多相关内容...>>VBA实现word页面设置
VBA实现word页面设置
Sub AutoOpen()
Am6AdU http://blog.numino.net/
Dim glkDoc As Document '定义变量
OfF2oK http://blog.numino.net/
Set glkDoc = Application.ActiveDocument '设置为当前文档
4h5Ilg http://blog.numino.net/
With glkDoc '设置文档参数
uQReaG http://blog.numino.net/
With .PageSetup '设置【页面设置】参数
tpCPSZ http://blog.numino.net/
.Orientation = wdOrientPortrait '页面方向:wdOrientPortrait--纵向,wdOrientLandscape--横向
3AIv5j http://blog.numino.net/
.PageWidth = CentimetersToPoints(21) '纸张宽21cm
RYfD2T http://blog.numino.net/
.PageHeight = CentimetersToPoints(29.7) '纸张高29.7cm
E3kKTT http://blog.numino.net/
.TopMargin = CentimetersToPoints(2) '上边距2cm
uMivyN http://blog.numino.net/
.BottomMargin = CentimetersToPoints(1.5) '下边距1.5cm
rQ7V8z http://blog.numino.net/
.LeftMargin = CentimetersToPoints(2.5) '左边距2.5cm
l94m94 http://blog.numino.net/
.RightMargin = CentimetersToPoints(1.5) '右边距1.5cm
SClvDH http://blog.numino.net/
.HeaderDistance = CentimetersToPoints(0.5) '页眉0.5cm
Ekp56W http://blog.numino.net/
.FooterDistance = CentimetersToPoints(0.5) '页脚0.5cm
sI0zJD http://blog.numino.net/
End With '结束【页面设置】参数设置
S2Ojv7 http://blog.numino.net/
.Save '保存文档参数
u5D89N http://blog.numino.net/
End With '结束文档参数设置
Xmx6id http://blog.numino.net/
End Sub
更多相关内容...>>VBA实现word页面设置

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

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