Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Printing to Acrobat - Possible to use VBA to program PDF file name

I have a Home sheet that has a series of names

Example: A11 = c:\PDFFiles\Sheet1.pdf
A12 = c:\PDFFiles\Sheet2.pdf


You can use formulas for create names.

I have the vba sub linked to a button on Home Sheet.

Sub CreatePFF()

Sheets("Sheet1").Select
Range("a1").Select

Dim PDFFilename As String

Let PDFFilename = Sheets("Home").Range("a11")
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=PDFFilename, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False

Let PDFFilename = Sheets("Home").Range("a12")
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=PDFFilename, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False

Range("a1").Select

Sheets("Home").Select
Range("b5").Select

End Sub

"Tom Joseph" wrote:

I would like to automate creation of a series of PDFs. Each from a print
range on a different Excel sheet.

I would like the PDF file names to be taken from a series of cells in Excel.
eg

PDF 1 would be called "20090129_ED-IPSTAT-ONC.pdf". This string would be
stored in Cell A1.

PDF 2 would be called "20090129_PerformanceSummary.pdf". This string would
be stored in Cell A2.

and so on.


Any help would be greatly appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Printing to Acrobat - Possible to use VBA to program PDF file

Sorry this posted before I was done

I have a Home sheet that has a series of names
Print setup is done in each sheet based on the reports

Clicking the button will create all 20 reports and place them in the folder
on my C Drive on I can change it to a folder on the Server.


Example: A11 = c:\PDFFiles\Sheet1.pdf
A12 = c:\PDFFiles\Sheet2.pdf
I have 20 names for reports listed

You can use formulas for create names.

I have the vba sub linked to a button on Home Sheet.

Sub CreatePDF()

Sheets("Sheet1").Select
Range("a1").Select

Dim PDFFilename As String

Let PDFFilename = Sheets("Home").Range("a11")
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=PDFFilename, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False

Sheets("Sheet2").Select
Range("a1").Select

Let PDFFilename = Sheets("Home").Range("a12")
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=PDFFilename, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False


Sheets("Home").Select
Range("a1").Select

End Sub


"Mark" wrote:

I have a Home sheet that has a series of names

Example: A11 = c:\PDFFiles\Sheet1.pdf
A12 = c:\PDFFiles\Sheet2.pdf


You can use formulas for create names.

I have the vba sub linked to a button on Home Sheet.

Sub CreatePFF()

Sheets("Sheet1").Select
Range("a1").Select

Dim PDFFilename As String

Let PDFFilename = Sheets("Home").Range("a11")
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=PDFFilename, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False

Let PDFFilename = Sheets("Home").Range("a12")
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=PDFFilename, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False

Range("a1").Select

Sheets("Home").Select
Range("b5").Select

End Sub

"Tom Joseph" wrote:

I would like to automate creation of a series of PDFs. Each from a print
range on a different Excel sheet.

I would like the PDF file names to be taken from a series of cells in Excel.
eg

PDF 1 would be called "20090129_ED-IPSTAT-ONC.pdf". This string would be
stored in Cell A1.

PDF 2 would be called "20090129_PerformanceSummary.pdf". This string would
be stored in Cell A2.

and so on.


Any help would be greatly appreciated.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing to Adobe Acrobat Dean[_8_] Excel Programming 0 July 18th 06 12:11 AM
Printing to Adobe Acrobat robert PHILLIPS Excel Programming 0 December 7th 05 10:17 PM
Printing to Acrobat Koval Excel Programming 0 January 29th 04 01:41 AM
Error when printing to Acrobat Ray Kanner[_2_] Excel Programming 1 January 2nd 04 08:16 PM
Printing using Acrobat Ray Kanner[_2_] Excel Programming 3 December 26th 03 01:57 AM


All times are GMT +1. The time now is 02:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"