Hello Friends,
i have multiple pdf files and want to extract the pages count of each individual pdf.
is it possible in macro?
Please suggest me
i want 2 details of each file
i.e. 1) FileName, 2) Pages
Hello Friends,
i have multiple pdf files and want to extract the pages count of each individual pdf.
is it possible in macro?
Please suggest me
i want 2 details of each file
i.e. 1) FileName, 2) Pages
Hi Mohan,
check out this attached file and let me know is it for your looking for
Thanks - Naveed
-----------------------------
If the suggestion helps you, then Click * to Add Reputation
To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
Hello Naveed,
thanks for reply
i run your code and found this error
also fileName on sheet1 is ok but page count of each file is 0 which wrong![]()
Please Login or Register to view this content.
Hello Naveed,
thanks for reply
i run your code and found this error
also fileName on sheet1 is ok but page count of each file is 0 which wrong![]()
Please Login or Register to view this content.
Hello Naveed,
thanks for reply
i run your code and found this error
also fileName on sheet1 is ok but page count of each file is 0 which wrong![]()
Please Login or Register to view this content.
Hi mohan
replace below code
![]()
Please Login or Register to view this content.
Hello Naveed,
now the last line of pageCount function having problem
run-time error no. 13
![]()
Please Login or Register to view this content.
The code below works for me and correctly puts the file name in column A with pages in column B
I have tried it with Excel2010 and Excel2016 and BOTH work
I am also using Windows7
Try my file attached - amend the folder path, then run PDFandNumPages
![]()
Please Login or Register to view this content.
Last edited by kev_; 06-10-2017 at 10:35 AM.
Click *Add Reputation to thank those who helped you. Ask if anything is not clear
Thanks for reply
i tried your code but this time i get all filename in column A but in B Column Pagecount shows 0.
where i am getting wrong, please suggest
How do you expect me to work that out when you provide no information?![]()
![]()
Please post your modified code enclosed in code tags
thanks
Hi,
i just make one changes in your code i.e Path
rest of all the code is same for me.
Hi Kev,
i am using Acrobat reader 9.0 version of pdf
Please post your code as requested
Also attach an example pdf file
thanks
(the code works for me with all pdf's on my computer, but your pdf file may have a different structure???)
Last edited by kev_; 07-04-2017 at 06:48 AM.
Hi Kev,
I have no code if you see my first post.
i required two 2 things from pdf file i.e. File Name and Pages
as per your code i get only file name correctly but page count shows 0.
i check your code on another PC where Acrobat professional 7.0 version installed and found OK.
thats why i made last post that "i am using Acrobat Reader 9.0 version of pdf."
now we know that its a pdf version problem so is there any chance to get page count in Acrobat reader version?
Please suggest.
Please attach 2 pdf files for me to test
- pdf(1) = where page count = 0
- pdf(2) = where page count > 0
Hi Kev,
there is no problem in pdf, the problem is in version.
if you have Adobe Reader 9.0 version of pdf then you can also check
Try modifying the code. Please add one line of code after this line:
add this line:![]()
Please Login or Register to view this content.
Does the message pop up when you run the code on the "bad" machine?![]()
Please Login or Register to view this content.
Hi KEV,
yes,
i got the msg "Overflow tripped"
I have amended the macro to provide me with extra information on sheet named "sInput" in attached workbook
Please:
1 amend this line in the macro to match a folder on your system
2 Put 10 pdf files in that folder![]()
Please Login or Register to view this content.
3 run the macro
4 manually enter the number of pages against each file in column B on sheet FileList
5 attach the workbook to your reply
thanks
Last edited by kev_; 07-05-2017 at 05:23 AM.
post deleted by kev_
Last edited by kev_; 07-05-2017 at 05:23 AM.
AOA Naveed,
found the error "Run-time error '75': while running the macro with your shared excel file.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks