How can i find Headings in a word document using blueprism

We have some headings like Job Description, Summary. how can we find in word document using blueprism and also how can we change the font of Text ?

For Example

Job Description :

UiPath,Blueprism

Summary :

Hi I am Deepak
 

VJR

Well-Known Member
Hi deepak.chawla92,

There is an existing 'Find Text' action in the MS Word VBO.
Create a duplicate copy of this action an make the below changes shown in blue.

This is just a basic skeleton so that you can achieve what you are looking for.
You need to customise the other parameters and make changes accordingly.

Dim d As Object = GetDocument(handle,document_name)
Dim w As Object = d.Application
Dim s As Object = w.Selection
Dim f As Object = s.Find

Try

f.ClearFormatting 'Remove this line
With f
.Text = Text
.Replacement.Text = "" 'Remove this line and replace with below line
.Replacement.Font.Bold = True

.Forward = True
.Wrap = 1 'wdFindContinue
.Format = False 'Remove this line
.MatchCase = match_case
.MatchWholeWord = match_whole_word
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
found = f.Execute 'make changes to this line as below
found = f.Execute(Replace:=2) '2:=wdReplaceAll


Catch ex As Exception

found = False

Finally

d = Nothing
w = Nothing
s = Nothing
f = Nothing

End try


The new action in the MS Word VBO:
View attachment 1542166844700.png

Output after running the Process:
View attachment 1542167034830.png
 
Top