当前位置:主页 > 软件编程 > Python代码 >
时间:2021-04-21 09:38:47 | 栏目:Python代码 | 点击:次
主要是打包的时候没有把default.docx打包进去
在创建Document的时候,采用本地的default.docx,可以从安装目录templates文件夹中找到,放置到exe目录下面即可
doc = Document(docx=os.path.join(os.getcwd(), 'default.docx'))
完美解决啦!