- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-06-22 11:25 AM
Hi everyone!
Hope you are doing okay!
I have a question:
How can I get the number of pages into a WORD document?
Thank you for your time!
Erjola
------------------------------
Erjola Mema
------------------------------
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-06-22 12:04 PM
You can do this in a couple of steps:
- Import, or ensure you have, the MS Word VBO from the Program Files
- Create a new version of this VBO called "MS Word VBO - Extended" - to align with our best practices
- Create a new action called "Count Document Pages" with the following detail:
- Inputs: [handle] and [documentName]
- Process Flow: Start > Call CheckInstanceHandle Page > Code Stage > End
- Code Stage
- 'Declare object for code use
Dim doc as Object = GetDocument(handle,documentName)
'Returns the number of pages in the document associated with the range (whole document).
result = doc.Range.Information(4)
- 'Declare object for code use
- Outputs: Result
All the best,
James
------------------------------
James McLintock Program Lead
Intelligent Automation, Program Lead
Blue Prism
Europe/London
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-06-22 12:04 PM
You can do this in a couple of steps:
- Import, or ensure you have, the MS Word VBO from the Program Files
- Create a new version of this VBO called "MS Word VBO - Extended" - to align with our best practices
- Create a new action called "Count Document Pages" with the following detail:
- Inputs: [handle] and [documentName]
- Process Flow: Start > Call CheckInstanceHandle Page > Code Stage > End
- Code Stage
- 'Declare object for code use
Dim doc as Object = GetDocument(handle,documentName)
'Returns the number of pages in the document associated with the range (whole document).
result = doc.Range.Information(4)
- 'Declare object for code use
- Outputs: Result
All the best,
James
------------------------------
James McLintock Program Lead
Intelligent Automation, Program Lead
Blue Prism
Europe/London
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-06-22 01:29 PM
You can find the latest MS Word VBO here.
NOTE: We went ahead and added actions for getting the count of paragraphs, lines, and words in the document too.
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-06-22 01:30 PM
It worked fine!
Thank you @James McLintock !
------------------------------
Erjola Mema
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-06-22 01:32 PM
Great !
Thank you @EricWilson1 !
------------------------------
Erjola Mema
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-06-22 03:57 PM
Thanks
Nilesh
------------------------------
Nilesh Jadhav
Senior RPA Specialist
ADP
India
------------------------------
Consultant
ADP,India
