VB code to auto generate a PDF file from Excel

Does any know the VBA code to create a PDF from an Excel file with the file name automatically taken from a cell value so that there's no prompt using a dialog box for the filename? I'm using Adobe 8.0 and Excel 2003.
Using Google, I've seen some links that reference the following, but it looks like this is for creating a PS file.
Application.ActivePrinter = Range("AcrobatPrinter")
ActiveWindow.SelectedSheets.PrintOut , prTofilename:=Range("FileName")
AcrobatPrinter is a range that references a cell with a value of "Adobe PDF on Ne02:" and Filename is a range the references a cell with the file name in UNC.

See the Distiller API document, in the Acrobat SDK. Specifically, look
for the information on how to stop the prompt for filename in the
Adobe PDF printer.
Aandi Inston

Similar Messages

  • How to generate a pdf file from Excel

    Hi all,
    I've a Excel file i want to generate a pdf file by using java...can any one explain wht r the things r required. If ur answer is "iText" or "apache FOP" then wht r the things to be needed...I want to know the exact answer...step by step....plz help me out...
    Eagarly waiting for reply...
    regards
    [email protected]

    hi,
    I've a idea on jdk,,,i need to know who to use FOP packages?
    regards,
    [email protected]

  • Problem Creating PDF Files from Excel 2007

    I am running WinXP SP2, Office 2007, and Acrobat v8.1.2. I have an Excel workbook with multiple worksheets. When I was using Excel 2003 I could create a PDF file using five of the six worksheets. Since upgrading to Office 2007 I am unable to create PDF files from Excel. I can create PDF files from Word 2007. When I attempt to use the Acrobat Plug-in to create a PDF I get a message saying the file needs to be saved first. It then attempts to save the file to a strange, somewhat random, file name (e.g. A234G53). When I say OK Excel just hangs and is unresponsive. The way that I can clear it is to stop Excel using Task Manager. I have tried reinstalling Acrobat without successfully solving the problem. Any ideas on how I can diagnose and/or solve the problem?
    Thanks.

    Is your Excel file on a location outside your machine's disk? If so, try copying to local disk.
    Does the Excel file have any protection applied to it? If so, try removing the protection
    If these don't work, can you post a sample file that demonstrates the problem.

  • Flatten a PDF file from Excel

    Flatten a PDF file from Excel
    Is there any way to run a javascript to flatten a PDF document from Excel?
    I’m populating a PDF form from Excel by creating a FDF file, once I finish I need to flatten it.
    Is there any way to accomplish this without having Adobe Acrobat?
    Thank you,
    Luis Gonzalez

    Reader cannot flatten a document, if that's what you're asking. A user with Acrobat installed can, in which case you can use VBA to control Acrobat. For exampe: http://www.khk.net/wordpress/2009/03/04/adobe-acrobat-and-vba-an-introduction/

  • How to generate a pdf document from excel on ipad version?

    IS there a way to generate a pdf document from an excel file directly from excel ipad version ?

    IS there a way to generate a pdf document from an excel file directly from excel ipad version ?

  • Using Acrobat X and creating a PDF File from EXCEL 2010, I notice that the Pagination restarts at 1 for each Worksheet included in the PDF.

    I use Acrobat X Standard and created a PDF file from two or more worksheets using EXCEL 2010.
    The resulting PDF file restarts the PAGE # (In header/footer settings of Excel) at 1 for each worksheet.
    However, a colleague of mine who has Acrobat X Pro version, using EXCEL 2010 and same exact file does the same task, he gets a file that starts at page 1 and second worksheet continues the page # from the last page of the First worksheet.
    We both are using the ACROBAT menu (not the print to Adobe printer) to create the file so that we can get Bookmarks included in the resulting file for each worksheet.
    We cannot figure out any option in Acrobat's preferences that controls the pagination on either of these versions of Acrobat.
    So is this just a feature that works one way in Standard version and another way in the Pro version, and the user has no control over it?

    This is so sad. I read your comments and I said, "Huh?" Haha!
    I tried the indexed color option and it did make the final file smaller. Around 600KB. But there's probably another way to make it even smaller like the gazillion-paged pdf file that I mentioned that was only about 300KB.
    And by saying a layout program, does that mean like Adobe InDesign? Does that mean that I should just make my graphics in Photoshop and then import using another program and finish the file there?
    What other layout programs can I use?
    Thank you so much!

  • Generating a PDF file from the date entered on line and serving it to user

    All,
    I need to create a page where the data will be entered by the user outside the company.
    The requirement is to create a pdf file which dynamic images and a bar code and server ir once the user clicks a button.
    In short, they do not want the user to go to the report manager or process monitor to see the image.
    Any thought on how this can be accomplished ?

    Is there a special reason to create PDF file? I have generated dynamic images and HTML content including Barcode based on user data entry on the fly.If you need more information, please contact me at [email protected]

  • Generating a PDF file from a formPrintView:PrtViewCreateScr = new PrtViewCreateScr();

    I am using formPrintView:PrtViewCreateScr = new PrtViewCreateScr(); to create and loada form to print the contents of a database record.
    I would like to be able generate and save a pdf file containing the same data formatted in the same way.
    Is there any functionality available in FLEX 3 to accomplish this?
    Is there an external open source offering available? (I have seen AlivePDF, but there doesn't appear to be any current traffic on the web site I know of - lucamezzalira.com/2009/02/28/...)
    Is this covered in Flash 4 and would an upgrade to this release be the better route? (given that the pdf create/save is an important feature of my application)
    Any ideas/suggestions woudl be greatly appreciated.
    Scott

    Even on the same machine ...
    I am not working with mySQL, try Google it, but what I am saying is that if you are anticipating requests for reports printing and practically every business application would have reporting mechanism, you should look into integrating into your Flex front-end program some server side reports generation. There are free SQL Server versions available, you can try these. But I would carefully select a report engine because depending on user requirements you will get down the road some report programs might not be what you want. What you could do with a free copy is to come up with a vehicle to deliver a report to your Flex interface. You need to decide what format to use. For example: PDF, HTML, Image, something else.

  • Opening a .pdf file from Excell 2011 hyperlink

    I have a problem opening a .pdf file hyperlinked in Excel 2011 file.
    The message is: "No program is registered to open this file".
    If I go from explorer the file is regularly opened with Adobe Reader.

    Delete the following item, then quit and relaunch Safari:
    /Library/Internet Plug-ins/AdobePDFViewer.plugin

  • Creating pdf file from excel worksheet and save file in a macro created folder.

    Hi I have 3 worksheets and I want to conditionally convert them into a pdf file and than save said file into a folder that the macro will create if not already existing and name it with content of cell A1. So my question is if it is possible to do that with
    the following program?
    Thanks.
    Sub PrintStuff()
    Dim vShts As Variant
    Dim strFileName As String
    vShts = Sheets(1).Range("A1")
    If Not IsNumeric(vShts) Then
    Exit Sub
    Else
    ' Change path and filename as desired
    strFileName = "C:\MyFolder\MySubfolder\MyFile.pdf"
    If strFileName <> "False" Then
    Select Case vShts
    Case 1
    Sheets("Sheet1").Select
    Case 2
    Sheets("Sheet2").Select
    Case 3
    Sheets(Array("Sheet1", "Sheet2")).Select
    End Select
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
    Filename:=strFileName, _
    OpenAfterPublish:=False
    End If
    End If
    End Sub

    Option Explicit
    Sub PrintStuff()
    Dim Path As String, FileName As String
    Dim ThisSheet As Variant
    Dim MySheets As Variant
    Path = "C:\MyFolder\MySubfolder\"
    FileName = "MyFile.pdf"
    If Not FolderCreate("C:\MyFolder\MySubfolder") Then
    MsgBox "Can not create folder"
    Exit Sub
    End If
    Select Case Range("A1")
    Case 1
    Set MySheets = Sheets("Sheet1")
    Case 2
    Set MySheets = Sheets("Sheet2")
    Case 3
    Set MySheets = Sheets(Array("Sheet1", "Sheet2"))
    Case Else
    MsgBox "Uuups."
    Exit Sub
    End Select
    Set ThisSheet = ActiveSheet
    MySheets.Select
    ActiveSheet.ExportAsFixedFormat xlTypePDF, Path & FileName, OpenAfterPublish:=False
    ThisSheet.Select
    End Sub
    Private Function FolderCreate(ByVal Path As String) As Boolean
    'Creates a complete sub directory structure
    Dim Temp, i As Integer
    On Error GoTo ExitPoint
    If Dir(Path, vbDirectory) = "" Then
    If Right$(Path, 1) = "\" Then Path = Left$(Path, Len(Path) - 1)
    If Left$(Path, 2) = "\\" Then
    i = InStr(3, Path, "\")
    Temp = Split(Mid$(Path, i + 1), "\")
    Temp(0) = Left$(Path, i) & Temp(0)
    Else
    Temp = Split(Path, "\")
    End If
    Path = ""
    For i = 0 To UBound(Temp)
    Path = Path & Temp(i) & "\"
    If Dir(Path, vbDirectory) = "" Then MkDir Path
    Next
    End If
    FolderCreate = True
    ExitPoint:
    End Function

  • Starting PDF file from Excel 2003 via a hyperlink

    After updating to Reader X I can't open a hyperlink to PDF-files any more which are listed in an Excel-sheet. With Reader 9 it worked all-time. No I get the answer from the Reader, that the document can't be opened.
    What to do?

    Try shutting down all running instances of the Reader process and then clicking on the link to the PDF in Excel. It works for me then.

  • Why does a red line is appearing when generating a pdf file from illustrator?

    I create my slide using illustrator (from CS2 to CS5) and when I save the file in pdf format, a red line is being created around the rectangle border of the silde.
    I don't know how it was generated and what to do to remove it.
    I need help please.

    car-c,
    Is it vector or raster artwork?
    Slides?
    A few images might reveal something, one preferably being a screenshot with the artwork selected, maybe along with an opened Leyer.

  • Creating pdf files from excel workbook

    I'm trying to convert an excel file to pdf. It contains 10 sheets and when viewing the entire workbook the total number of pages should be 15 pages. If I send it to print in adobe pdf. It starts creating different files for different sheets sometimes it puts together 3 or more sheets but sometimes it creates one file for one sheet. For this particular document ir creates 8 files. Later on if I put the 8 files together the pagination is correct. Can this be done in one step? Maybe I'm not aware of a file break feature. If I try to use the pdf maker it tells me that it can't create tags because there is a set print area or because I'm using print titles so I have to create the pdf by selecting print and select pdf as printer to be able to create it. Is there an easier way to create one file with the 15 pages at once?

    I was having the same problem.  I saw this and when I attempt to open that forum, it doesn't take me to that page.  It takes me to the generic forums page (http://forums.adobe.com/index.jspa).  I'd love to solve this problem as it drives me nuts.
    Can anyone provide either an updated link or the instructions themselves?
    Thanks!

  • Unable to create PDF files from Excel 2010 x64

    I am currently having problems with the Excel PDF plugin that comes with Acrobat XI Pro 11.0.7.  Whenever I try to click on "Create PDF" or "Preferences" (or any of the buttons for that matter), I get the following error dialogue:
    The Acrobat plugin for Word functions perfectly, only Excel gives me problems.  I've already tried repairing Office & Acrobat as well as doing a complete uninstall/reinstall.  Has anyone come across this issue before?  It should also be noted that the account I am using has full administrator privileges.

    Firefox Support - I even create a Firefox account just to agree with [email protected] I appreciate the word "Thank you for being awesome!" when I registered the account and I certainly do hope you all guys being awesome to. Please do something with all this Firefox update - add-on plugin no longer support thingy. Firefox still awesome, it's just that I can't do much wit it anymore like I used to do. Ohh yayy theres Safari..

  • Search pdf files from excel or text edit list

    I have a folder called "Photos"
    in that folder i have many say (100+) files like
    1234567_001
    1234567-001.01
    1234567_001.02
    1234567_123456
    11111111_001
    11111111-001.01
    11111111_001.02
    11111111_123456
    2222222_001
    2222222-001.01
    2222222_001.02
    2222222_123456
    6666666_001
    6666666-001.01
    6666666_001.02
    6666666_123456
    and so on
    I  have a list in my excel that contains selected few files (say 20) as 11111111 and 2222222 in seperate cells or in text pad
    my requirement is i need to find all the files irrespective of 001 002 and copy, paste in new folder
    so i will get 20 main files and other associated files like 001 002 etc
    Kindly help!!! Thanks in advance!!!

    Is your Excel file on a location outside your machine's disk? If so, try copying to local disk.
    Does the Excel file have any protection applied to it? If so, try removing the protection
    If these don't work, can you post a sample file that demonstrates the problem.

Maybe you are looking for

  • Print a pdf file from sap

    Hello, I'm looking for a way to print a .pdf file from sap . The file  was created manualy and is in a newtwork folder. I have to send the print to a network printer . Is it possible to use the AcroRd32.exe as a command line? Thank you.

  • Several questions - new to Creative Zen Touch - please help (ripping/accessori

    Hi, I just ordered my new Zen Touch 20gb online last night with a set of Sony earbuds (MDR-EX5LP). I'm pretty excited, get it this Friday. I just had a few questions in advance: A) Which programs are best for ripping, allow you to adjust the quality

  • IPod not recognised on one computer but OK on another

    I manage a number of iPod nanos for my children on my PC (vista). In the last few days, one of them (pink nano)is not recognised by windows nor therefore in iTunes. I tried by 60GB iPod and had same problem. Plugged in my blue nano and works perfectl

  • Quantity update into sales order using BAPI_SALESORDER_CREATEFROMDAT2

    Hi All, I am able to create a sales order using the BAPI "BAPI_SALESORDER_CREATEFROMDAT2". But even after assinging the Target_quntity and the Target_quantity_units, the values are not getting updated into the Sales order, but the sales order gets cr

  • Can i use a 5 watt charger on ipad retina?

    Have an ipad retina display ( not mini) my charger got ruined and bought a 5 watt charger, can i use it?, will it ruin my ipad? Will it reduce the overall batrery life. Thank you for support