I want to replace a word in my paragraph with a hyperlink. I saw functions that can create a new word with hyperlink but that's not what I want. For example I want to do something like this:
mydoc = docx.Document()
text = "a stackoverflow question"
parag = mydoc.add_paragraph(text)
parag.add_hyperlink(the word that will be changed to the hyperlink (in that case
that can be "stackoverflow"), link('https://stackoverflow.com'))
With this add_hyperlink
function, the stackoverflow word must be a hyperlink.
Is there any way to do this?