//设置页边距,后2个参数为页眉和页脚的高度
//其中参数单位为“厘米CM”,Word里面是用磅为单位,1英尺等于72磅,1厘米等于0.3937英尺
Try
ole_document.PageSetup.TopMargin = Top * 28.3464
ole_document.PageSetup.BottomMargin = Bottom * 28.3464
ole_document.PageSetup.LeftMargin = Left * 28.3464
ole_document.PageSetup.RightMargin = Right * 28.3464
ole_document.PageSetup.HeaderDistance = Header * 28.3464
ole_document.PageSetup.FooterDistance = Footer * 28.3464
Catch(RunTimeError e)
ErrorText = "设置页边距失败.错误信息:~r~n" + e.GetMessage()
Return -1
End Try
Return 1
//其中参数单位为“厘米CM”,Word里面是用磅为单位,1英尺等于72磅,1厘米等于0.3937英尺
Try
ole_document.PageSetup.TopMargin = Top * 28.3464
ole_document.PageSetup.BottomMargin = Bottom * 28.3464
ole_document.PageSetup.LeftMargin = Left * 28.3464
ole_document.PageSetup.RightMargin = Right * 28.3464
ole_document.PageSetup.HeaderDistance = Header * 28.3464
ole_document.PageSetup.FooterDistance = Footer * 28.3464
Catch(RunTimeError e)
ErrorText = "设置页边距失败.错误信息:~r~n" + e.GetMessage()
Return -1
End Try
Return 1