Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.
Public Sub SetMarginsToDefault() 'Uses a global string "strOpenreport" set to the name of the currently open report 'Allows use of this sub from any open report 'Set margin defaults for Letter or A4 size paper depending on region ' First, determine what size is the regional default ' looks up and assigns regional default based on user's looked up region, allows for additional defualt types Dim setRegionalMargin 'setRegionalMargin = "letter" 'comment in/out for testing 'setRegionalMargin = "A4" 'comment in/out for testing setRegionalMargin = DLookup("PaperSize", "tblRegion", "Region = " & "'" & varRegion & "'") 'specifies the regional paper size and margin format in twips Select Case setRegionalMargin Case "A4" With Reports(strOpenreport).Printer .PaperSize = acPRPSA4 .LeftMargin = 0.65 * 1440 .TopMargin = 0.5 * 1440 .RightMargin = 0.25 * 1440 .BottomMargin = 0.125 * 1440 End With Case "Letter" With Reports(strOpenreport).Printer .PaperSize = acPRPSLetter .LeftMargin = 0.3 * 1440 .TopMargin = 0.625 * 1440 .RightMargin = 0.25 * 1440 .BottomMargin = 0.25 * 1440 End With End Select End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.