![]() |
Printing PDF outputting to multple files - change to 1 file
Hi,
I have recorded a macro to print my worksheets to a PDF buts its forcing me to create multiple PDF's. There are 6 worksheets I am saving and the output is prompting / saving 3 PDF files. The first has 1 worksheet, the second has 4 worksheets, and the last has 1. I would 'ACTUALLY' like all worksheets to be saved as 1 PDF. What would be causing the addin to prompt for spearate files here? I am using Excel 2000 SP3 and Acrobat v5.0.10 Bruce Sub print_PDF() Application.ActivePrinter = "Acrobat PDFWriter on LPT1:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "Acrobat PDFWriter on LPT1:" End Sub Rgds, Bruce |
Printing PDF outputting to multple files - change to 1 file
Bruce,
What is value of ActiveWindow.SelectedSheets.Count ? Unless there is some strange setting in the PDF print driver that limits files to a certain size, I fail to see how you get 3 files from a single print call. NickHK "Bruce" wrote in message ... Hi, I have recorded a macro to print my worksheets to a PDF buts its forcing me to create multiple PDF's. There are 6 worksheets I am saving and the output is prompting / saving 3 PDF files. The first has 1 worksheet, the second has 4 worksheets, and the last has 1. I would 'ACTUALLY' like all worksheets to be saved as 1 PDF. What would be causing the addin to prompt for spearate files here? I am using Excel 2000 SP3 and Acrobat v5.0.10 Bruce Sub print_PDF() Application.ActivePrinter = "Acrobat PDFWriter on LPT1:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "Acrobat PDFWriter on LPT1:" End Sub Rgds, Bruce |
Printing PDF outputting to multple files - change to 1 file
Nick,
ActiveWindow.SelectedSheets.Count = 6. I will check the print driver settings. Rgds, Bruce "NickHK" wrote: Bruce, What is value of ActiveWindow.SelectedSheets.Count ? Unless there is some strange setting in the PDF print driver that limits files to a certain size, I fail to see how you get 3 files from a single print call. NickHK "Bruce" wrote in message ... Hi, I have recorded a macro to print my worksheets to a PDF buts its forcing me to create multiple PDF's. There are 6 worksheets I am saving and the output is prompting / saving 3 PDF files. The first has 1 worksheet, the second has 4 worksheets, and the last has 1. I would 'ACTUALLY' like all worksheets to be saved as 1 PDF. What would be causing the addin to prompt for spearate files here? I am using Excel 2000 SP3 and Acrobat v5.0.10 Bruce Sub print_PDF() Application.ActivePrinter = "Acrobat PDFWriter on LPT1:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "Acrobat PDFWriter on LPT1:" End Sub Rgds, Bruce |
Printing PDF outputting to multple files - change to 1 file
Bruce wrote:
Nick, ActiveWindow.SelectedSheets.Count = 6. I will check the print driver settings. Rgds, Bruce Bruce, What is value of ActiveWindow.SelectedSheets.Count ? [quoted text clipped - 31 lines] Bruce I have had this happen to me sometimes, Make sure that you have each worksheet that you want to print show the same paper size & print quality on PAGE SETUP Good luck |
Printing PDF outputting to multple files - change to 1 file
Francois & Bruce,
Just found that you also need the margins set the same. Then voila, 1 file. NickHK "Francois" <u18959@uwe wrote in message news:5c36fa21b9293@uwe... Bruce wrote: Nick, ActiveWindow.SelectedSheets.Count = 6. I will check the print driver settings. Rgds, Bruce Bruce, What is value of ActiveWindow.SelectedSheets.Count ? [quoted text clipped - 31 lines] Bruce I have had this happen to me sometimes, Make sure that you have each worksheet that you want to print show the same paper size & print quality on PAGE SETUP Good luck |
Printing PDF outputting to multple files - change to 1 file
I had that problem forever and had given up on a solution, until one
night many months later, I woke up with a very simple solution: in my print macro I would hide all the sheets that did not require printing eg : if this cell in sheet1 was less than 0 then sheet1 visibility = false and so on the macro will go throught the sheets and hide what needs to be hidden, and then instead of printing selected sheets, I will command it to print entire workbook here's an example Sub PrintSelectSheets() Application.ScreenUpdating = False 'Print One Sheets("Select").Select If ActiveSheet.Range("F4").Value < 1 Then Sheets("one").Select ActiveWindow.SelectedSheets.Visible = False End If 'print two Sheets("Select").Select If ActiveSheet.Range("F5").Value < 1 Then Sheets("two").Select ActiveWindow.SelectedSheets.Visible = False End If 'Print three Sheets("Select").Select If ActiveSheet.Range("F6").Value < 1 Then Sheets("three").Select ActiveWindow.SelectedSheets.Visible = False End If 'Print four Sheets("Select").Select If ActiveSheet.Range("F7").Value < 1 Then Sheets("four").Select ActiveWindow.SelectedSheets.Visible = False End If 'Print five Sheets("Select").Select If ActiveSheet.Range("F8").Value < 1 Then Sheets("five").Select ActiveWindow.SelectedSheets.Visible = False End If 'Print six Sheets("Select").Select If ActiveSheet.Range("F9").Value < 1 Then Sheets("six").Select ActiveWindow.SelectedSheets.Visible = False End If 'print base winder 1 left Sheets("Left Winder 1").Select If ActiveSheet.Range("L3").Value < 1 Then Sheets("Left Winder 1").Select ActiveWindow.SelectedSheets.Visible = False End If 'print base winder 1 right Sheets("Right Winder 1").Select If ActiveSheet.Range("M3").Value < 1 Then Sheets("Right Winder 1").Select ActiveWindow.SelectedSheets.Visible = False End If 'print base landing 1 left Sheets("Left Landing 1").Select If ActiveSheet.Range("A1").Value < 1 Then Sheets("Left Landing 1").Select ActiveWindow.SelectedSheets.Visible = False End If 'print base landing 1 Right Sheets("Right Landing 1").Select If ActiveSheet.Range("H1").Value < 1 Then Sheets("Right Landing 1").Select ActiveWindow.SelectedSheets.Visible = False End If 'print winder 2 left Sheets("Left Winder 2").Select If ActiveSheet.Range("L3").Value < 1 Then Sheets("Left Winder 2").Select ActiveWindow.SelectedSheets.Visible = False End If 'print winder 2 right Sheets("Right Winder 2").Select If ActiveSheet.Range("M3").Value < 1 Then Sheets("Right Winder 2").Select ActiveWindow.SelectedSheets.Visible = False End If 'print landing 2 left Sheets("Left Landing 2").Select If ActiveSheet.Range("A1").Value < 1 Then Sheets("Left Landing 2").Select ActiveWindow.SelectedSheets.Visible = False End If 'print landing 2 Right Sheets("Right Landing 2").Select If ActiveSheet.Range("H1").Value < 1 Then Sheets("Right Landing 2").Select ActiveWindow.SelectedSheets.Visible = False End If Sheets("Start").Select ActiveWindow.SelectedSheets.Visible = False Sheets("Select").Select ActiveWindow.SelectedSheets.Visible = False Sheets("extra pages").Select ActiveWindow.SelectedSheets.Visible = False 'Print workbook Application.ActivePrinter = "PDF reDirect v2 on Ne00:" ActiveWorkbook.PrintOut Copies:=1, ActivePrinter:= _ "PDF reDirect v2 on Ne00:", Collate:=True 'unhide sheets Sheets("one").Visible = True Sheets("two").Visible = True Sheets("three").Visible = True Sheets("four").Visible = True Sheets("five").Visible = True Sheets("six").Visible = True Sheets("Left Winder 1").Visible = True Sheets("Left Winder 2").Visible = True Sheets("Right Winder 1").Visible = True Sheets("Right Winder 2").Visible = True Sheets("Left Landing 1").Visible = True Sheets("Left Landing 2").Visible = True Sheets("Right Landing 1").Visible = True Sheets("Right Landing 2").Visible = True Sheets("extra pages").Visible = True Sheets("Select").Visible = True Sheets("Start").Visible = True end sub I am sure there is a more efficient way this code could be written but it does what I want Good Luck |
All times are GMT +1. The time now is 08:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com