Windows 7 - Excel 10 currently but initial started it with Excel 2003- I know enough to be dangerous. I have a good size Excel application running.
I'm using modified Dom Hill, June 2008 code to Create_PDFs. The code takes all of the sheets you want to print and combines them into one PDF. This works great as it allows me to use SendKeys to open Acrobat or Acrobat reader in full screen mode and produce a slide show on another monitor while data is added to the program. Create_PDFs requires Distiller, so any machine that uses the program has to have Acrobat too. $$$
I changed the output format to be more uniform which centralized the report data but made the PrintArea variable. Unfortunately I've found the PrintArea string is limited to 256 characters, significantly below what I can potential need.
When I went off to find a work around, I saw some code by Kenneth Hobson a subset of which is below which sent my mind into another direction. Can I eliminate Distiller? Can I have multiple PrintAreas defined for the same worksheet thereby sidestepping the 256 character limitation.
I haven't been able however to find answers to a few of questions I have.
1. Does the method used above require Acrobat/Distiller object library?
2. Is it possible to generate a multipage PDF using this method?
3. If one was to use an array of worksheet to be printed via this method, could the printArea for each worksheet be dynamical built.
Thanks in advance for your assistance.
I'm using modified Dom Hill, June 2008 code to Create_PDFs. The code takes all of the sheets you want to print and combines them into one PDF. This works great as it allows me to use SendKeys to open Acrobat or Acrobat reader in full screen mode and produce a slide show on another monitor while data is added to the program. Create_PDFs requires Distiller, so any machine that uses the program has to have Acrobat too. $$$
I changed the output format to be more uniform which centralized the report data but made the PrintArea variable. Unfortunately I've found the PrintArea string is limited to 256 characters, significantly below what I can potential need.
When I went off to find a work around, I saw some code by Kenneth Hobson a subset of which is below which sent my mind into another direction. Can I eliminate Distiller? Can I have multiple PrintAreas defined for the same worksheet thereby sidestepping the 256 character limitation.
Code:
' Code by Kenneth Hobson
Sub PublishToPDF(fName As String, o As Object)
Dim rc As Variant
rc = Application.GetSaveAsFilename(fName, "PDF (*.pdf), *.pdf", 1, "Publish to PDF")
If rc = "" Or rc = False Then Exit Sub
o.ExportAsFixedFormat Type:=xlTypePDF, Filename:=rc _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End Sub
I haven't been able however to find answers to a few of questions I have.
1. Does the method used above require Acrobat/Distiller object library?
2. Is it possible to generate a multipage PDF using this method?
3. If one was to use an array of worksheet to be printed via this method, could the printArea for each worksheet be dynamical built.
Thanks in advance for your assistance.