Update the Paper Size on All Reports

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?
 
C

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
 
C

CompGeek78

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top