I have been using Python-doc to operate Word recently, and now I want to write a piece of data, which contains text and images. I need to make the text and images on the same line, but I have tried many methods, and all of them can only be a line of text and a line of images. Is there any way to solve this problem?
Here is the code I wrote:
from docx import Document
from docx.shared import Inches
document = Document()
document.add_paragraph('111111111111')
document.add_picture(r'G:\141-220F411194A92.png', width=Inches(1.25))
document.save(r'G:\\1.docx')