+ Reply to Thread
Results 1 to 14 of 14

Filter and print to PDFs

  1. #1
    Registered User
    Join Date
    12-05-2018
    Location
    pittsburgh, pa
    MS-Off Ver
    365 for Mac
    Posts
    14

    Filter and print to PDFs

    I'm looking for a way to filter a spreadsheet by the first column and export a PDF for each filtered value, with the name "value-Workbook Name" and saved to the same folder the workbook is in.

  2. #2
    Valued Forum Contributor than_gold's Avatar
    Join Date
    10-17-2017
    Location
    Coimbatore India
    MS-Off Ver
    Office 365
    Posts
    646

    Re: Filter and print to PDFs

    Could you please attach a sample excel file?
    To help you in better way?!
    Regards,
    Thangavel D

    Appreciate the help? CLICK *

  3. #3
    Registered User
    Join Date
    12-05-2018
    Location
    pittsburgh, pa
    MS-Off Ver
    365 for Mac
    Posts
    14

    Re: Filter and print to PDFs

    I can't attach any of the actual data, as it contains personal information for customers, but I've attached a quick sample excel file and PDF to better illustrate my needs.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor than_gold's Avatar
    Join Date
    10-17-2017
    Location
    Coimbatore India
    MS-Off Ver
    Office 365
    Posts
    646

    Re: Filter and print to PDFs

    here you go:
    First macro to spilt the records based on col A & export macto to export data to PDF in your desied path
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Filter and print to PDFs

    Or try:
    (Macro paste into the standard module in the vba editor, i.e. Alt + F11 => Insert => Module)
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-05-2018
    Location
    pittsburgh, pa
    MS-Off Ver
    365 for Mac
    Posts
    14

    Re: Filter and print to PDFs

    porucha vevrku, this looks more like what I was looking for, but when I try to run the sub, I get the error code "runtime error 429: ActiveX Component can't create object". I hit debug and when i hit debug, it highlights the line "Set dict = CreateObject("Scripting.Dictionary")"

  7. #7
    Registered User
    Join Date
    12-05-2018
    Location
    pittsburgh, pa
    MS-Off Ver
    365 for Mac
    Posts
    14

    Re: Filter and print to PDFs

    Perhaps I should've mentioned that I'm working on a mac?

  8. #8
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Filter and print to PDFs

    Quote Originally Posted by maximiliax View Post
    ... I'm working on a mac ...
    The Microsoft Scripting Runtime library is not available in Office for Mac ...
    ... they write so everywhere ...

  9. #9
    Registered User
    Join Date
    12-05-2018
    Location
    pittsburgh, pa
    MS-Off Ver
    365 for Mac
    Posts
    14

    Re: Filter and print to PDFs

    I actually remote access a PC for some programs that don't run on Mac, and I tried this out and it works perfectly! Thank you for your help. If anyone has a solution for Office 365 on Mac, I'd greatly appreciate it, but this already saves me so much time. Thank you Porucha!

  10. #10
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Filter and print to PDFs

    For mac try this, interesting if it will work (?):
    Please Login or Register  to view this content.
    From the previous macro delete this line:
    Please Login or Register  to view this content.
    and change:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and change:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    (remove this '.Select')
    Last edited by mjr veverka; 12-06-2018 at 03:56 PM.

  11. #11
    Registered User
    Join Date
    12-05-2018
    Location
    pittsburgh, pa
    MS-Off Ver
    365 for Mac
    Posts
    14

    Re: Filter and print to PDFs

    I copied the code and pasted into a new module in my workbook, and when I run, I get:
    Runtime Error 1004: Application defined or object defined error

    I hit debug, and it highlights:
    .ExportAsFixedFormat Type:=xlTypePDF, FileName:=thswrkbpth & flenme, Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=False

  12. #12
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Filter and print to PDFs

    ... ... maybe path separator ... change:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and check ...

  13. #13
    Registered User
    Join Date
    12-05-2018
    Location
    pittsburgh, pa
    MS-Off Ver
    365 for Mac
    Posts
    14
    Quote Originally Posted by porucha vevrku View Post
    ... ... maybe path separator ... change:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and check ...
    I tried that when I saw, but same error code

  14. #14
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Filter and print to PDFs

    and is this working with ' .Path & "\" ' (i.e. before change) in your office for windows or not ?


    EDIT:

    see topic:

    https://www.excelforum.com/excel-pro...xedformat.html
    Last edited by mjr veverka; 12-06-2018 at 05:55 PM.

+ 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. Print to a pdf but then ADD existing pdfs to the newly created pdf
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-01-2016, 09:03 PM
  2. Print PDFs from IE hyperlinks in Excel
    By cwebb4ever in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2016, 03:53 PM
  3. Can print to pdf COMBINE the pdfs for me?
    By cheesefry in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-01-2015, 05:40 AM
  4. Macro to print sections of file as PDFs
    By dzags18 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2013, 04:59 PM
  5. open and and print .pdfs in column D
    By johnson1421 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-25-2012, 07:52 AM
  6. Print content of hyperlinked PDFs
    By banyard2000 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2012, 03:06 AM
  7. Windows XP : Batch Print PDFs in Explorer in order of List
    By BEEJAY in forum Microsoft Windows Help
    Replies: 0
    Last Post: 06-06-2011, 10:34 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