Extract image position from .docx file using python-docx
问题 I'm trying to get the image index from the .docx file using python-docx library. I'm able to extract the name of the image, image height and width. But not the index where it is in the word file import docx doc = docx.Document(filename) for s in doc.inline_shapes: print (s.height.cm,s.width.cm,s._inline.graphic.graphicData.pic.nvPicPr.cNvPr.name) output 21.228 15.920 IMG_20160910_220903848.jpg In fact I would like to know if there is any simpler way to get the image name , like s.height.cm