Microsoft Word Styles for Heading Numbering across Doclets

Shomesh

New Member
Hi,

Using Blue Prism, I need to apply the specific styles to a numbering scheme headings in my word doc. For example, I want to number headings so that top-level headings that are numbered 1, 2, 3, should use the style Heading 1 and second-level headings that are numbered 1.1, 1.2, and 1.3 should use Heading 2 and third-level headings that are numbered 1.1.1, 1.1.2, and 1.1.3 should use Heading 3. Also the text between the heading use be changed to Normal Style.

The attached pic will give you much clarity about my requirement!

word heading styles.JPG


In the above image the 3 Available Options should use Heading 1 style and 3.1 Option - 1 should use Heading 2 and 3.1.1 Description and 3.1.2 Benefits, Goals and Measurement Criteria should use Heading 3.Also, every text that the text happens to between the heading say for example : "This Section .......is required" should be used with Normal style.

Mutli Level Heading Styles.JPG



Initially I want to know the feasibility of my requirement in Blue Prism and if it is possible put forth your ideas to develop the logic. We shall execute out!


Thanks in Advance!
 
Last edited:

sahil_raina_91

Active Member
Hi,

Using Blue Prism, I need to apply the specific styles to a numbering scheme headings in my word doc. For example, I want to number headings so that top-level headings that are numbered 1, 2, 3, should use the style Heading 1 and second-level headings that are numbered 1.1, 1.2, and 1.3 should use Heading 2 and third-level headings that are numbered 1.1.1, 1.1.2, and 1.1.3 should use Heading 3. Also the text between the heading use be changed to Normal Style.

The attached pic will give you much clarity about my requirement!

View attachment 5970


In the above image the 3 Available Options should use Heading 1 style and 3.1 Option - 1 should use Heading 2 and 3.1.1 Description and 3.1.2 Benefits, Goals and Measurement Criteria should use Heading 3.Also, every text that the text happens to between the heading say for example : "This Section .......is required" should be used with Normal style.

View attachment 5971



Initially I want to know the feasibility of my requirement in Blue Prism and if it is possible put forth your ideas to develop the logic. We shall execute out!


Thanks in Advance!
This requirement is not something that comes pre-package in Word VBO.
You will have to create a custom action, to traverse all paragraphs in the active document.
If a heading is found, set range.style = "Heading1" and so on

Going through https://docs.microsoft.com/en-us/office/vba/api/word.range should be a nice start
 
Top