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)
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.
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