I have Excel and Adobe Acrobat v6. The default PDF file name will be same as the source Excel file. Here's where my VBA skills get stuck. Forum Rules.
|Published (Last):||16 August 2007|
|PDF File Size:||20.49 Mb|
|ePub File Size:||14.53 Mb|
|Price:||Free* [*Free Regsitration Required]|
Is there an easy way to print a bunch of excel files to pdf. Preferably without opening each one? Right now I open them all and individually print each one which takes forever. PS I tried click and print and it only prints the first page of the excel file. Try the suggestions here. So, ymmv. This was at an old job so I don't have my code anymore.
I used to do this all the time as long as you can create a PDF you should be able to do this. I used to print 30 PDFs a month or so without having to open any of them. Bah sounds hard. But I need to do this for a new project. VBA it is. It isn't. Search on my posts in Tech because I think a couple years ago I posted the code I used. Otherwise record a macro and change it to pass in multiple names and output names.
This was at an old job so I don't have my code anymore x I love PDF creator. Thanks guys. Edit: someone informed me that my post made it sound like I was responding as GA only with an Alt. I'm not GA. Just by coincedence I had a similar problem. Because I had used the search function, I actually hadn't noticed the date of this thread when posting.
I assumed it was older and I just stumbled upon gold in finding it and it being useful, thus my thanks. Further proof, why would GA have an alt with nearly 5k in posts that's 2 years older than his main ID? I would never admit to being GA either someone's sarcasm detector is broken. Are you going to share the code? The code I needed was straight from the website: All I had to do was change the bolded code to match the file directory and filename that I wanted. EDIT: oops, just noticed one other thing I changed.
You'll also need to add the abobe pdf libraries into the VBA editor which you do by selecting Tools Also, at some point I'm going to add this code, in case someone else besides me needs to run the macro and for some reason their PDFCreator is on something else besides Ne I wrote a VBA program recently to do something similar. The macro opens up several 10 or so different Excel documents, based on path and file names stored in named ranges within the Excel workbook that contains the macro.
There are about 80 total pages that need to be converted to. However, instead of 80 separate. The result is a single. It was all working great when I was in Office Then I upgraded to Office and started having problems.
When running the macro, after it gets up to about the 50th page or so, I get an error message saying "Microsoft Excel is waiting for another application to complete an OLE operation". The error repeats over and over again and really bogs down the macro, to the point where it might take an hour to execute rather than just a few minutes.
I haven't been able to get past this error. Anyone ever get this error or know how to correct it? I can post the code on Monday when I get back in the office.
Office has a native print to PDF too. I'll have to post my code tomorrow when I'm back in the office. Can you expand on that? I've never had a problem with PDFCreator. It's pretty much perfect. Usually when I get the bolded error message it's because there is some hidden pop up asking me to either confirm that I would like to enable macros or asking me if I would like to refresh the links to external forces. If this started happening after you upgraded to office 10 then I'm guessing you never updated your default security settings for macros.
Value Application. Activate ActiveSheet. Range "A1". Select End Sub. On a Mac, you can do this for free by creating a simple Automator workflow. Here is the code I'm using. I'm not terribly experienced in VBA. I copied the function off the internet. InsertPages PDDoc1. It was working fine in Excel and then once I started using Excel I started getting the error: "Microsoft Excel is waiting for another application to complete an OLE operation".
Oops, sorry. The bold is not correct, I was confusing this with another macro. The macro that is giving me the "Microsoft Excel is waiting for another application to complete an OLE operation" is not opening up other files at all.
I updated my trust settings to consider anything on the shared drive a "trusted source", but no luck. I have Googled the heck out of this error and still not found a solution.
Activate Sheets "DV Stmt". Activate Sheets "DV Cert". Select Sheets "DV Stmt". Select False ActiveWindow. Please try again. I'll try and help, but I'm no genius at programming VBA either. My thoughts off what you gave is that you just need to find the spots in the code where the new excel files are made, then throw in some code to print those tabs to pdf before you either send the tabs to the new excel file or before you close that new excel file.
Hopefully that makes sense. Like I said, without understanding your macro better, I can't help a lot. I'd find some simple code that works for you in printing to pdf and then insert it as I suggest above.
PrintOut to PDF, but PDF corrupt
Log In. Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action. Click Here to join Tek-Tips and talk with other members!
Subscribe to RSS
Tech support scams are an industry-wide issue where scammers trick you into paying for unnecessary technical support services. Additionally, some scammers may try to identify themselves as a Microsoft MVP. You can help protect yourself from scammers by verifying that the contact is a Microsoft Agent or Microsoft Employee and that the phone number is an official Microsoft global customer service number. Did this solve your problem? Yes No.