Hi
After trying to figure this out for weeks, I am coming to you guys for help again
Here's what I'm trying to do. I have a page in a workbook that needs to be printed out to pdf. Ten pages are printed, so the ranges are set, some of these are landscape, some are portrait.
What is currently done: A macro prints based on settings described, and each page is printed, into ten different pdf files, requiring user to name each one each time and confirm printing...VERY TEDIOUS because this has to be done in at least 60 workbooks.
What I changed it to do: Macro now prints to postcript first, so it automatically names the files and converts into pdf files.
What I want it to do: The macro to print to postcript and name automatically works ok, but one problem...it doesn't maintain printing in landscape...is there a fix to this? It prints all pages as portrait.
Also, is there a way I can automatically combine the 10 files into one pdf file?
Thanks!
The existing code works other than the landscape printing, I will attach it as a txt document in case anyone wants to look at it. I would love help though on printing landscape and combining the files.
Last edited by VBA Noob; 12-19-2008 at 11:28 AM.
I notice that you are manually changing printers, you can do this in the code. Something like this
Code:Option Explicit Private Sub cmdCompanyPart1_Click() Dim DefaultPrinter As String 'get default printer DefaultPrinter = Application.ActivePrinter ' change printer Application.ActivePrinter = "Adobe PDF Writer on CPW2:" 'print sheet 'your code here ' change back to default printer Application.ActivePrinter = DefaultPrinter End Sub
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Thank you for that, I will definitely incorporate that into my code.
Any help for the landscape issue or combining files?
Thanks...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks