Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now
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.
|How can I check if a field is null and whether it is or not, still run the code||40||70|
|MS Access How To Run a Macro From Task Manager...Not With AutoExec...I Need To Call A Public Sub||3||46|
|ms access 2013 - getting a list of software from a user's computer||4||47|
|Access Query To Find The Average Date Between Two Dates||3||18|
Join the community of 500,000 technology professionals and ask your questions.