Unable to create word document from a template

Hi Experts,
Need your help in resolving an issue, I want to create a word document from a word template where some data would be dynamic, I have placed the word template in my project data folder, I am loading this template in word scope and replacing the variable text with the data coming from other source.

The problem is, bot replaces the values in template itself an save it there.
Template File:

Once document is created, above template values get changed, please see below:
image

However bot should not change any data in template and should create a new file from it.

Will appreciate your response.

Did you tried Save Document as in Word scope?


After replacing the Text you can use this option. It will save as a new document

Yes, I am saving the word document as a PDF so using Save document asd PDF inside word scope.

Uncheck the Autosave option in Word document scope
Auto
:slight_smile:

this is already unchecked
image

Hi ,

your code is wrong.

if you want to not change the original template. you need to copy the original template to a new path and use a new path for filling the values.

I have tried same . Its changing the Template design as you said . I can say work around I tried the Read-Only mode . It will pop up save as a document

You can save the document . Template will be remains save

sorry, i didnt get, would you please share more information?

As @irahmat Mentioned … You can keep the Template Folder . You can copy the file Process folder and then do the operations So this makes template remains same in Template folder . You just need copy the template new folder and Use that

Thank you @irahmat, got it, will give it a try.

Thank you @Vijay_RPA
Appreciate your help

1 Like

If resolved it please keep it as Solution :slight_smile: . It helps for others