+ Reply to Thread
Results 1 to 2 of 2

PrintFile

  1. #1
    Registered User
    Join Date
    07-14-2007
    Posts
    7

    PrintFile

    Good morning


    I would like to know how can I print a file already in a folder with VBA code.

    It's a *.ps file so I cannot(don't want aswell) to open it in the workbook, just print it to the printer.

    Many Thanks

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    PrintFile

    Many years ago...I used this kind of DOS command:

    COPY /B C:\FOLDER\FILENAME.PS \\SERVER\PRINTERNAME

    The "/B" indicates to DOS to perform BINARY transfer, instead of the default of Text.

    In VBA, you coud probably use this construct:
    Please Login or Register  to view this content.
    See the SHELL command in VBA Help for more information.

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1