Update the Paper Size on All Reports

  • Thread starter Thread starter CompGeek78
  • Start date Start date
C

CompGeek78

Anyone know an easy way to update the Paper Size from Letter to A4 on
all reports in a database through VBA code?
 
Hi,

Well, here is one way. I do not know if it is the best.

Dim ao As AccessObject
Dim rpt As Report

For Each ao In CurrentProject.AllReports
DoCmd.OpenReport ao.Name, acViewDesign
Set rpt = Reports(ao.Name)
rpt.Printer.PaperSize = acPRPSA4
DoCmd.Save
DoCmd.Close acReport, ao.Name, acSaveNo
Next ao


Clifford Bass
 
Hi,

     Well, here is one way.  I do not know if it is the best.

    Dim ao As AccessObject
    Dim rpt As Report

    For Each ao In CurrentProject.AllReports
        DoCmd.OpenReport ao.Name, acViewDesign
        Set rpt = Reports(ao.Name)
        rpt.Printer.PaperSize = acPRPSA4
        DoCmd.Save
        DoCmd.Close acReport, ao.Name, acSaveNo
    Next ao

                 Clifford Bass

Thanks Cliff worked like a charm.

Keven Denen
 
Back
Top