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.
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.
Could you please attach a sample excel file?
To help you in better way?!
Regards,
Thangavel D
Appreciate the help? CLICK *
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.
here you go:
First macro to spilt the records based on col A & export macto to export data to PDF in your desied path
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.
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")"
Perhaps I should've mentioned that I'm working on a mac?
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!
For mac try this, interesting if it will work (?):
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.
toPlease Login or Register to view this content.
and change:Please Login or Register to view this content.
toPlease Login or Register to view this content.
(remove this '.Select')Please Login or Register to view this content.
Last edited by mjr veverka; 12-06-2018 at 03:56 PM.
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
... ... maybe path separator ... change:
toPlease Login or Register to view this content.
and check ...Please Login or Register to view this content.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks