How to copy the replace value in exact place in word file

Hi Team,

Could you please help me to place the value in word file in exact location where i want to key in.
When i am replacing the value in word file,its displaying as unformatted.
Here is the word file:
Word File_Replace Text.docx (12.9 KB)

I am getting the output as:
Word File_Replace Text_Result.docx (18.3 KB)

Expecting output as:

@Shashi123 @avejr748 @Lipika_Porey

Hi @RajeshT,

Read the word file and store the output in a variable string.
Now variable.Replace(“<>”,“Var(replacementvalue)”)
Do it for every variable that you want to replace the value.

Thank you

Hi @desineediaditya,

Still i cannot place the values with the expected format using your code.
Any other solutions?

Hi @RajeshT,
If that doesn’t work try using
Replace text activity for word document that will replace the value where you needed.

Happy Automaton!
Thank you

1 Like

Hi @desineediaditya,

You are correct ,but i am facing issue after replacing the values the replaced values are displaying in unstructerd format

Hi @RajeshT
if you share the screenshot of output that you are getting then it will be more clear.

Thank you

1 Like

Hi @desineediaditya,

I am getting ouput as below:

If the appearance is always like that, i think you do not need to do replace. You can just write each line in a word file starting with “Meanwhile, we wish…” then new line, another newline. Then newline write the value for the product type dec(n) add 25 spaces (or whatever you wnat then Accepted sum assured(n). What will break the alignment of the texts is the product type desc not being the same lenght. You can deal with it by finding the longest possible number of characters in your product type desc. Then create a logic to check the length of your product type desc and if its shorter than the longest, then add additional spaces with the same number of characters to match the longest. It is virtually making all your product type desc of the same length

1 Like

Hi @avejr748,

Possible for you to create one sample xaml for me as mentioned.
Appreciate your help!

Here you go SampleForRajesh.xaml (12.8 KB)
As this is just a sample, this is very crude but you get the idea. Just improve it as per your needs

1 Like