Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How change the file location that I save my files to? John Scinto[_2_] Excel Discussion (Misc queries) 1 December 26th 07 01:14 AM
.xlt files change from 300 dpi to 600 dpi when printing with MODI. junior77048 Excel Discussion (Misc queries) 0 November 13th 06 06:03 PM
What format are files saved in when printing to a file from Excel RonVanNost Excel Programming 1 June 1st 05 07:08 PM
How do I change file/open/"files of type" to default to "all file. How do I changefiles of type default Excel Discussion (Misc queries) 1 April 19th 05 10:45 PM
importing text file, removing data and outputting new text file Pal Excel Programming 8 February 27th 04 08:32 PM


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"