Results 1 to 10 of 10

Thread: [SOVLED] Export a report as a PDF file from access

  1. #1

    Thread Starter
    New Member ChrisChubs's Avatar
    Join Date
    Jun 2004
    Posts
    12

    Resolved [SOVLED] Export a report as a PDF file from access

    Anyone know how to do it?

    I've been searching everywhere, and all i can find is code that explains how to do it with acrobat 5.

    I've got VBA code that can change the default printer to the Adobe PDF driver, and back to the previous driver.

    But it still comes up with the thing that asks what filename you want to export it to, which i can't figure out.

    Any ideas?
    Last edited by ChrisChubs; Oct 7th, 2004 at 08:50 PM.

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951
    Here is some code from one of my systems. It exports to a PDF file.

    Set Report = crxApplication.OpenReport("Z:\DAD\CertificateofComplianceB.rpt", 1)
    For Each crxDatabaseTable In Report.Database.Tables
    crxDatabaseTable.ConnectionProperties("user id") = "sa"
    crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
    Next crxDatabaseTable
    Report.ExportOptions.FormatType = crEFTPortableDocFormat
    Report.ExportOptions.DiskFileName "C:\Certificate_of_Compliance_" & jobinx & ".pdf"
    Report.ExportOptions.DestinationType = crEDTDiskFile
    Report.Export False

  3. #3

    Thread Starter
    New Member ChrisChubs's Avatar
    Join Date
    Jun 2004
    Posts
    12
    Your code is for crystal reports. I'm using access, unfortunately.

    Anyone?

  4. #4
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157
    You have to have Acrobat Writer inorder to do this.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  5. #5

    Thread Starter
    New Member ChrisChubs's Avatar
    Join Date
    Jun 2004
    Posts
    12
    I have got acrobat writer, its just i need to be able to set it to save to a filename i choose from code, instead of prompting the user to choose its filename.

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    You may want to try the Developer or Newsgroups on
    the Adobe website. You can sign up for free to gain access, but to
    get to the advanced stuff you need to subscribe for $$$.

    Acrobat support
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    New Member ChrisChubs's Avatar
    Join Date
    Jun 2004
    Posts
    12

    Resolved

    I figured out how to do it.

    The trick is to forget about the acrobat PDF writer, its junk.

    Download pdfFactory and use its printer driver and registry entries to export to a specific file. It also is a LOT faster than acrobat, and less buggy. Seriously adobe get your butt in gear.

    Is anyone interested in how i coded it all in access?

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Sure post the code!
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

    Thread Starter
    New Member ChrisChubs's Avatar
    Join Date
    Jun 2004
    Posts
    12
    Here it is (in the first post)

  10. #10

    Thread Starter
    New Member ChrisChubs's Avatar
    Join Date
    Jun 2004
    Posts
    12
    Here it is (attached) - its an access 2000 file.

    You need to download and install PDFFactory from here, as well:
    http://www.fineprint.com/

    Only costs $50us, and in my opinion works a million times better (less buggy, faster) than adobe.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width