I would like to obtain the number of pages in a DOCX document. Is there anyway?
Solved! Go to Solution.
Hi @vmarv,
You can convert it to a pdf and count the pages with an expression from the $content property (after converting it to a string).
Kudos to @Paulie78 for the expression: https://powerusers.microsoft.com/t5/Building-Flows/Number-of-pages-in-a-PDF-file/m-p/932846/highligh...
Below is an example of that approach with a docx.
Be aware that Convert action is a part of a premium connector.
sub(length(split(replace(base64ToString(outputs('Convert_Word_Document_to_PDF')?['body']['$content']), 'Type/Pages', ''), 'Type/Page')),1)
Hi @vmarv,
You can convert it to a pdf and count the pages with an expression from the $content property (after converting it to a string).
Kudos to @Paulie78 for the expression: https://powerusers.microsoft.com/t5/Building-Flows/Number-of-pages-in-a-PDF-file/m-p/932846/highligh...
Below is an example of that approach with a docx.
Be aware that Convert action is a part of a premium connector.
sub(length(split(replace(base64ToString(outputs('Convert_Word_Document_to_PDF')?['body']['$content']), 'Type/Pages', ''), 'Type/Page')),1)
Thanks! 😁😁😁😁😁😁
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
If you are a small business ISV/Reseller, share your thoughts with our research team.
User | Count |
---|---|
26 | |
25 | |
23 | |
22 | |
14 |
User | Count |
---|---|
49 | |
37 | |
36 | |
31 | |
30 |