Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2022, 12:33 PM
ranjan ranjan is offline Page Count Windows 10 Page Count Office 2019
Advanced Beginner
Page Count
 
Join Date: May 2021
Posts: 71
ranjan is on a distinguished road
Default Page Count

Hi,



I want to extract a page no.'s of documents in a folder.

In a Excel Column A is File name & Column B is Page No.'s

While running a macro file names in a folder should get copied into Column A and then corresponding page no's get pasted in column B.

I dont know whether it is possible through VBA or not, if it does not seems realistic please excuse.

I tried with RegExp.Pattern = "/Type\s*/Page[^s]" , its not working. its working only with PDF formats.

Format : ".docx" & ".rtf" & ".pdf"
Folder selection by browse option.
Strpath = Input("Please enter files pat")


Your Help is highly appreciated ...

Last edited by ranjan; 05-16-2022 at 12:36 PM. Reason: Added PDF
Reply With Quote
  #2  
Old 05-22-2022, 08:56 AM
Purfleet Purfleet is offline Page Count Windows 10 Page Count Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

try the below

Quote:
Sub PageCount()

Dim Pagesx As Variant

Pagesx = ActiveWorkbook.Worksheets("Sheet1").PageSetup.Page s.Count

Debug.Print Pagesx

End Sub
Reply With Quote
  #3  
Old 05-23-2022, 11:24 AM
ranjan ranjan is offline Page Count Windows 10 Page Count Office 2019
Advanced Beginner
Page Count
 
Join Date: May 2021
Posts: 71
ranjan is on a distinguished road
Default

I want to extract a page no.'s of documents in a folder.

In a Excel Column A is File name & Column B is Page No.'s

While running a macro file names in a folder should get copied into Column A and then corresponding page no's get pasted in column B.

This is my requirement, I dont know how the above code will get works...

Please review and do the needful..
Reply With Quote
Reply

Tags
page count

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing page numer and total page count in TOC Ulodesk Word 5 02-12-2014 01:03 PM
Page Count page count increases on its own -inserts white pages itsema Word 1 03-06-2013 12:48 PM
Page Count Increasing Exponentially BobF Word 3 03-23-2012 12:20 PM
Page Count Word: count total page of each section salmonrose Word 1 10-15-2011 05:10 AM
Mac Word problem - page count hover Peophin Word 0 12-18-2009 01:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2022 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft