Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 25 of 25

Thread: Solved: How to auto print .PDF files

  1. #21
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    Quote Originally Posted by Agni1978
    Incase Adobe is already installed on your machine simply use ShellExecute API.

    Put this on top of all declarations

    Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
    ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
    ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

    and simply use as

    ShellExecute 0&, "open", fileFullPath, 0, "Directory", 0
    The question of the original poster was ... PRINT pdf files. So you need to change the "open" command to a "Print" command.

    More details regarding this subject can be found here : http://www.xcelfiles.com/ShellExecuteA.html

    Charlize

  2. #22
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Can someone put together a KB Item for this?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #23
    VBAX Newbie
    Joined
    Sep 2010
    Posts
    1
    Location
    You can find something about this in the Adobe Developer FAQ. (It's a PDF document rather than a web page, which I guess is unsurprising in this particular case.)

    The FAQ notes that the use of the command line switches is unsupported.

    To open a file it's:

    AcroRd32.exe <filename>

    The following switches are available:

    * /n - Launch a new instance of Reader ever if one is already open
    * /s - Don't show the splash screen
    * /o - Don't show the open file dialog
    * /h - Open as a minimized window
    * /p <filename> - Open and go straight to the print dialog
    * /t <filename> <printername> <drivername> <portname> - Print the file the specified printer.

    For command line pdf printing is bether use CLPrint

  4. #24

    autoprint

    Charlize[/QUOTE]

    Clicking Print command for each file is really a daunting task when there are hundred of files to be printed. The better alternate is to use FolderMill for automatic Printing PDF Files and Folders. I got it from foldermill.com It can print the entire Folders without any hassle. It really saves a lot of time while i can do other tasks.

  5. #25
    VBAX Newbie
    Joined
    Aug 2015
    Posts
    1
    Location

    Bulk PDF Printing

    Hello,

    I suggest PrintConductor for Bulk PDF Printing if u have to print hundreds of PDFs. It lets you select the entire folder at once and print it all. PrintConductor is a good printing management software. Search PrintConductor more info

Posting Permissions

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