1

I have this file that contains values from sharepoint's document set, which in turns creates a .docx file with values that are under 'content control'.

I am looking to convert all 'content control' words to normal words so i can replace the values using docxtpl.DocxTemplate. The issue I face now is that DocxTemplate does not read values that are under 'content control' so I am unable to replace the text. Is there a workaround for this issue that I have?

I have tried converting the docx to doc file (using os.rename) but the document set values were missing, this can be done manually and it works though. (link to this method: https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_win10-mso_o365b/remove-content-controls-in-word/9d9a8711-f7d8-4b3d-819a-2ba731e4f811)

1
  • os.rename will not change the file content. So even though the filename will end in .doc, the contents will still have the format of a docx document. Using MS Word to convert the file manually is indeed the right way. In case you want to automate the conversion: stackoverflow.com/a/48832989/3653185 Commented Mar 14, 2022 at 11:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.