Help: More Excel
How do I create a macro that will convert multiple excel documents into pdf files?
How do I create a macro that will convert multiple excel documents into pdf files?
| +139 | Restructuring: Anti-climactic Experience | 37 | 15m |
| +111 | IB Net Worth / Savings Check | 51 | 11h |
| +98 | Woman who emptied Knicks trashcan on street then stole it was DEI exec, worked at JPMorgan Chase | 25 | 9h |
| +79 | Stop sleeping on UBS - it’s pretty good | 29 | 7h |
| +71 | Hot take: I’d rather be at Desjardins than UBS for investment banking in 2026 | 13 | 3h |
| +56 | 2026 VAULT PRESTIGE RANKINGS | 30 | 1h |
| +39 | AI + Financial Modelling | 12 | 1d |
| +34 | Hardest interview experiences? | 20 | 6h |
| +28 | Summer before college | 18 | 2h |
| +26 | Current State of UBS in North America | 8 | 2d |
Career Resources
Can't you just get an application that prints into a pdf file? If you mean group 4 files printed into pdf into 1 aggregate file, there is a program that does it too. Mine came with the firm computer, but I'm sure you can search online to get something like it.
Just record macro and print to PDF.
Then play around with the code so instead of ActiveWorkbook it prints each of the 4 workbooks you want.
But only Mac has a built-in print to pdf option right? I have a mac, but if I do that, will it work on non-mac computers?
I think its going to be different on every computer because the Adobe PDF print driver is named differently. Open an excel workbook, go to Tools->Macro->Record Macro then print to PDF. Then stop recording and post the code Excel created on this thread and Ill explain what to do.
Elan, thanks for your help!
Sub Printpdf() ' ' Printpdf Macro ' Macro recorded 5/30/2008 by ' ' Keyboard Shortcut: Option+Cmd+p ' ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1 ActiveWindow.SelectedSheets.PrintOut Copies:=1 End Sub
did you actually print it? You have to complete everything so it actually prints it to PDF.
yeah I did. I get the same code whether I print as pdf or just plain print.
Not gonna work then, its different on PC I guess. Only way around that is to set the default printer to Adobe through VBA code and then set it back to the original Default after its done printing... not sure how to do it, but I know its possible. for the printing part you just want to do something to the effect of:
Sub Print4Workbooks() Dim i As Integer, wbks(3) As String wbks(0) = "c:\wbk1.slx" wbks(1) = "c:\wbk2.slx" wbks(2) = "c:\wbk3.slx" wbks(3) = "c:\wbk4.slx" For i = 0 To 3 For j = 0 To Workbooks(wbks(i)).Sheets.Count - 1 Application.Workbooks(wbks(i)).Sheets(j).PrintOut Copies:=1 Next j Next i End Sub
You may just be able to do Workbooks(wbks(i)).PrintOut Copies:=1 Also Google Excel PrintOut VBA, you should be able to specify which printer you want it to print to(Adobe PDF driver in this case).
Voluptate libero aut ad laudantium quo. Aut tenetur et impedit consectetur dolores. Nihil odio deserunt et sint facilis et consequatur. Sed nostrum voluptas assumenda nihil ducimus necessitatibus. Autem aut quod distinctio blanditiis. Voluptatem qui error ducimus perferendis. Et nostrum odio magnam neque ut cumque.
Molestias ut molestiae id. Illum quia vitae qui quibusdam animi et maxime.
Enim amet sit quia. Officiis reiciendis atque minima ducimus sunt non numquam. Sed odit exercitationem omnis voluptatum voluptatem.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...