+ Reply to Thread
Results 1 to 2 of 2

Print each sheet to PDF Printer NOT Using Save as PDF Function

  1. #1
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburgh, PA
    MS-Off Ver
    2010
    Posts
    1

    Print each sheet to PDF Printer NOT Using Save as PDF Function

    I need to save all sheets in a workbook using my pdf printer (Foxit PhantomPDF Printer on Ne04) using the sheet name as the filename. I believe i need to use my pdf printer vs the Save as PDF function (see below)

    I was using the code below, but it seems to save the sheets in landscape and in a size larger than the regular 8.5x11, which i need it to be. I have checked the default settings for Microsoft Print to PDf and they are set to Portrait, Letter size. Those are the only options under the printing preferences


    Dim ws As Worksheet

    For Each ws In Worksheets
    ws.Select
    nm = ws.Name

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
    Filename:="\\Server4\c$\Soft\Reporting Center" & nm & ".pdf", _
    Quality:=xlQualityStandard, IncludeDocProperties:=True, _
    IgnorePrintAreas:=False, OpenAfterPublish:=False

    Next ws

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Print each sheet to PDF Printer NOT Using Save as PDF Function

    Welcome to the board.

    Please take a few minutes to read the Forum Rules, and then edit your post to wrap your code with CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Printer Setup VBA to print active sheet - Still prints after Cancel
    By hans302 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-30-2017, 09:36 AM
  2. Replies: 1
    Last Post: 06-30-2017, 10:29 AM
  3. Replies: 0
    Last Post: 05-04-2015, 03:40 AM
  4. How Do I Code to print to a Printer by the Printer Name?
    By rkjudy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2013, 05:28 PM
  5. print on pdf printer - adjust filename & save
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-30-2011, 02:30 PM
  6. macro to print 2 copies to default printer, then 1 copy to Adobe PDF printer
    By jwright650 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2011, 01:07 PM
  7. Replies: 0
    Last Post: 05-25-2005, 11:06 AM

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