microsoft.public.scripting.vbscript - Microsoft Office Project
One idea is to get page width and height from cells PageWidth and PageHeight of PageSheet, ex, PgWi=objPage.PageSheet.Cells("PageWidth") PgHi=objPage.PageSheet.Cells("PageHeight") , and to decide ThisDocument.PaperSize in your own program.
Hi All Using VB.net 2008, windows forms application on Windows XP SP2 I need to set the paper size when printing to an 80mm Epson docket printer using windows drivers Some customers have invoices with many items on it and once past 297mm, the rest are lost (not printed) If I set a custom size within the printer driver (in printers and faxes) then all works fine. If not then the roll cuts off at 297mm, regardless of the custom size set in code, which is the default standard papersize length I have tried the following... which DOES NOT WORK frmpos.pd.PrintController = New StandardPrintController frmpos.pd.DefaultPageSettings.Margins.Left = 10 frmpos.pd.DefaultPageSettings.Margins.Right = 10 frmpos.pd.PrinterSettings.DefaultPageSettings.Margins.Left = 10 frmpos.pd.PrinterSettings.DefaultPageSettings.Margins.Right = 10 Dim pkCustomSize1 As New PaperSize("New Long Roll", 315, 2000) frmpos.pd.PrinterSettings.DefaultPageSettings.PaperSize = pkCustomSize1 frmpos.pd.DefaultPageSettings.PaperSize = pkCustomSize1 AddHandler frmpos.pd.PrintPage, AddressOf frmpos.pd_RePrintPage frmpos.pd.Print() RemoveHandler frmpos.pd.PrintPage, AddressOf frmpos.pd_RePrintPage Regards Steve
I am successfully using Ron de Bruin's Create and mail PDF files with Excel 2007. Here is the relevant snippet from his function: Myvar.ExportAsFixedFormat _ Type:=xlTypePDF, _ FileName:=Fname, _ Quality:=xlQualityMinimum, _ IncludeDocProperties:=True, _ IgnorePrintAreas:=False, _ OpenAfterPublish:=OpenPDFAfterPublish My questions is, where can I learn more of the above settings? Specifically, I would like to set the paper size to Legal. It's defaulting to Letter. But I would also like to know where I can learn all the parameters I can set this way for future reference. Thanks! Keith
Hi, I am unable to set the custom paper size using VB 6.0 (with SP 6) and Crystal Reports 8.5. I need to set it to 8.5 Inches x 6.0 Inches (Width x Height). My printer does not support the User Defined Sizes I have tried the following cod crptobj.PaperSize = crPaperUser