python-docx设置标题颜色
from docx import Document
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx.shared import Inches
from docx import Document
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx.shared import Inches
from docx.shared import Pt #磅数
from docx.oxml.ns import qn #中文格式
from docx.shared import RGBColor#设置字体
document = Document()
T1_1=document.add_heading('', level=1)
run_T1_1 = T1_1.add_run('一级标题')
#
共有 0 条评论