PrintToFile from spreadsheet

J

juzek

Hi,

i have such a code:

With Sheets("layout").PageSetup
.PrintArea = "$B$2:$D$26"
' .LeftHeader = ""
' .CenterHeader = ""
' .RightHeader = ""
' .LeftFooter = ""
' .CenterFooter = ""
' .RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.59)
.RightMargin = Application.InchesToPoints(0.59)
.TopMargin = Application.InchesToPoints(0.59)
.BottomMargin = Application.InchesToPoints(0.59)
.HeaderMargin = Application.InchesToPoints(0.118)
.FooterMargin = Application.InchesToPoints(0.118)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 144
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 90
.PrintErrors = xlPrintErrorsDisplayed
End With

Sheets("layout").PrintOut PrintToFile:="C:\test\" & Sheets("layout").Range("F4").Value

but nothing happen. How can i force :) my VBA to print this area to postscript file

regards
 

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

Similar Threads


Top