|
下面是一个函数我想问一下left!,top!,right!,bottom!是什么数据类型,还有1440(inches)是多少毫米,或是多少厘米
'------------------------Function-----------------------------
Public Function SetReportMarginDefault(strReportName As String, left!, top!, right!, bottom!)
Dim PrtMipString As str_PRTMIP
Dim PM As type_PRTMIP
Dim objRpt As Report
Dim tempPrtMip As String
DoCmd.Echo False
DoCmd.OpenReport strReportName, acDesign
Reports(strReportName).Painting = False
Set objRpt = Reports(strReportName)
PrtMipString.RGB = objRpt.PrtMip
LSet PM = PrtMipString
'Use 1440 for US (inches), 567 (rest of the world) (centimeters)
PM.xLeftMargin = left * 1440
PM.yTopMargin = top * 1440
PM.xRightMargin = right * 1440
PM.yBottomMargin = bottom * 1440
LSet PrtMipString = PM
objRpt.PrtMip = PrtMipString.RGB
'Make sure report has the focus
DoCmd.SelectObject acReport, strReportName
'Save the Report
DoCmd.DoMenuItem 7, acFile, 4, , acMenuVer70
CloseRpt:
DoCmd.Close acReport, strReportName
DoCmd.Echo True
'You're done.
End Function
|
|