from docx import Document w=Document(r'D:\word练习\练习.docx') for paragraph in w.paragraphs: if paragraph.style.name=='Normal': paragraph.paragraph_format.line_spacing=4.0 w.save(r'D:\word练习\行间距.docx')
from docx import Document w=Document(r'D:\word练习\练习.docx') for paragraph in w.paragraphs: if paragraph.style.name=='Normal': paragraph.paragraph_format.line_spacing=4.0 w.save(r'D:\word练习\行间距.docx')