dim xlapp As Excel.Application
dim xlbook As Excel.Workbook
dim xlsheet As Excel.Worksheet
dim xlPgSetup As Excel.PageSetup
Set xlapp = New Excel.Application
Set xlbook = xlapp.Workbooks.Open(App.Path & "try.xls") 'Open any file here
xlbook.Activate
DoEvents
Set xlsheet = xlbook.Worksheets(1) 'Set any worksheet
xlsheet.Activate
Set xlPgSetup = xlsheet.PageSetup ' assign pagesetup of current sheet to xlPgSetup object
xlPgSetup.PaperSize = xlPaperLetter 'Set the papersize here
'xlPgSetup.PaperSize = xlPaperA4
xlPgSetup.Orientation = xlLandscape
I am sure that there must be few more methods of doing the same job. Just u need to find all.
Pallavi Baviskar.