aliaga
(Ali Aga Mustofa)
January 2, 2024, 2:55am
1
Hi All,
Currently i’m developing Bot with activity Replace Text in Document
but i found the issue/bug for this activity.
Details : When bot using Word Activity Scope and have replace activity inside, bot will automatically add additional spacing like screenshoot below.
Word Replace.zip (208.0 KB)
Anyone can help to solve my issue?
Thankyou
mkankatala
(Mahesh Kankatala)
January 2, 2024, 3:04am
2
Hi @aliaga
Could you be more specific…
aliaga
(Ali Aga Mustofa)
January 2, 2024, 3:17am
3
Hi @mkankatala ,
Thankyou for your reply,
As you can see in the screenshoot,
Template : Position word Sample Header Here
is in 1st grid
Output : Position word Sample Header Here
is in 6th grid
This Output file happen when bot using activity Replace Text in Document
Thankyou
Anil_G
(Anil Gorthi)
January 2, 2024, 4:09am
4
@aliaga
Please try using trim in the input text …may be there is a new line character in the sentence
Str.Trim
Cheers
mkankatala
(Mahesh Kankatala)
January 2, 2024, 4:19am
5
Okay @aliaga
Try printing the Input value in the output panel. Check the Input value has any spaces, remove the spaces and try again.
Hope it helps!!
aliaga
(Ali Aga Mustofa)
January 2, 2024, 4:22am
6
HI @Anil_G ,
Already trim the input before go into replace activity but still has no impact.
Thankyou
aliaga
(Ali Aga Mustofa)
January 2, 2024, 4:23am
7
Hi @mkankatala ,
Already check the input and add trim for input before go into replace activity but still has no impact.
Thankyou
mkankatala
(Mahesh Kankatala)
January 2, 2024, 4:24am
8
If your file doesn’t have confidential information, could you share your word file. @aliaga
aliaga
(Ali Aga Mustofa)
January 2, 2024, 8:09am
9
Hi @mkankatala ,
You can download word template from here
Thankyou
mkankatala
(Mahesh Kankatala)
January 2, 2024, 9:49am
10
I found many word files in your attached zip file.
Could you send which file we have to use @aliaga
It seems that when using ‘Replace Text in Document’ in ‘Word Application Scope’, it will ‘expand’ the header and footer, then search and replace specific text. Other activities such as ‘Append Text’, ‘Read Text’ do not need to ‘expand’ the header and footer so that they don’t force display the header and footer.
I tested version 1.10.1, 1.16.2, 1.18.1 and they have all same behavior.
For ‘Replace Text in Document’, the workaround maybe using ‘Repalce Text in Document’ under System>File>WordDocument.
1 Like
aliaga
(Ali Aga Mustofa)
January 3, 2024, 7:31am
12
Hi @mkankatala ,
Sorry for late reply, you can use filename Sample Header Here.docx
for template using replace activity.
Thankyou