Transferring Workbook pages to adobe

Dennis Reynolds

New Member
Joined
Jul 12, 2011
Messages
9
I'm trying to export 4 pages of a report to a PDF using their exact same print preview settings (aka specific range of data). The PDF should also be 4 pages and the reports have to be resized to fit the PDF perfectly. Any help would be greatly appreciated.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
What do you mean by "report" in this instance? Part of a worksheet?

What code have you got already and in what way does it not work?
 
Upvote 0
What do you mean by "report" in this instance? Part of a worksheet?

What code have you got already and in what way does it not work?


This is a pre formatted report which already has print areas set that work perfectly. The report has to do with various risk capital and balance sheet limits for a specific company. I haven't written any code for this since I'm not quite sure how to get started. Ideally it would print to pdfFactoryPro and then save the report with some specific name. I've been browsing the internet for solutions but I couldn't find any that fit my problem. There are 4 worksheets within the report that need to get printed to the PDF.


So what I need is the Macro to select the specifically named worksheets, transfer them to PDF form somehow and then save the contents of the PDF with a specific name.
 
Upvote 0
I do something like this (Excel 2007):-
Code:
Sub Example()
 
  Sheets("[B][COLOR=red]Sheet1[/COLOR][/B]").PageSetup.PrintArea = "[COLOR=red][B]A1:G99[/B][/COLOR]"
  Sheets("[COLOR=red][B]Sheet1[/B][/COLOR]").ExportAsFixedFormat Filename:=[B][COLOR=blue]"c:\folder\report1.pdf"[/COLOR][/B], _
      Type:=xlTypePDF, Quality:=xlQualityStandard, IncludeDocProperties:=True, _
      IgnorePrintAreas:=False, OpenAfterPublish:=False
 
End Sub

You'd change the bits in red to suit your workbook. The bit in blue is a fixed filename but you could use a file dialog box to browse to the folder you wanted to save to or use ThisWorkbook.Path, for example.

Then you'd either repeat the code for each report or make it a procedure to which you pass the worksheet name, range and PDF filename, and call that once for each report.
 
Upvote 0

Forum statistics

Threads
1,224,608
Messages
6,179,872
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top