摘要: Sub 插入页码() ActiveDocument.PageSetup.OddAndEvenPagesHeaderFooter = False '关闭奇偶页相同(防止上回启用奇偶页不同后没有关闭此项设置) With ActiveWindow.ActivePane.View .SeekView = w 阅读全文
posted @ 2022-11-28 00:21 沭水之虾 阅读(856) 评论(0) 推荐(0) 编辑
摘要: 1、打开WORD选项,自定义 >所以命令 >FormatDrawingObjectWrapSquare 2、按照下图操作即可 阅读全文
posted @ 2022-04-27 11:38 沭水之虾 阅读(747) 评论(0) 推荐(0) 编辑
摘要: 1、WORD视图中 添加宏,代码如下 Sub 插入普通页码() ActiveDocument.PageSetup.OddAndEvenPagesHeaderFooter = False '关闭奇偶页相同(防止上回启用奇偶页不同后没有关闭此项设置) With ActiveWindow.ActivePa 阅读全文
posted @ 2022-04-27 11:32 沭水之虾 阅读(1100) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf8 -*- import time from selenium import webdriver f = open('sdsf.txt',mode='r',encoding='utf-8') keys=f.readlines() f.close() driver = 阅读全文
posted @ 2021-06-11 09:35 沭水之虾 阅读(135) 评论(0) 推荐(0) 编辑
摘要: f = open('sdsf.txt',mode='r',encoding='utf-8')keys=f.readlines()f.close() 阅读全文
posted @ 2021-06-11 07:36 沭水之虾 阅读(376) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver from selenium.webdriver.common.keys import Keys option=webdriver.ChromeOptions() option.add_argument('--start-maximized 阅读全文
posted @ 2021-06-10 16:38 沭水之虾 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #删除某个段落2021-06-01#https://github.com/python-openxml/python-docx/issues/33def delete_paragraph(paragraph): p = paragraph._element p.getparent().remove( 阅读全文
posted @ 2021-06-01 08:22 沭水之虾 阅读(1304) 评论(0) 推荐(0) 编辑
摘要: 使用Python对word文档进行操作 一、安装Python-docx Python-docx是专门针对于word文档的一个模块,只能读取docx 不能读取doc文件。说白了,python就相当于windows操作系统,QQ就是跑在windows操作系统上的软件,QQ最大的作用是可以去聊天,说话。 阅读全文
posted @ 2021-05-31 15:00 沭水之虾 阅读(191) 评论(0) 推荐(0) 编辑
摘要: from docx import Document from docx.shared import Inches document = Document() document.add_heading('Document Title', 0) p = document.add_paragraph('A 阅读全文
posted @ 2021-05-14 18:27 沭水之虾 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1 from docx import Document 2 from docx.shared import Inches 3 4 document = Document() 5 6 document.add_heading('Document Title', 0) 7 8 p = document. 阅读全文
posted @ 2021-05-14 18:09 沭水之虾 阅读(146) 评论(0) 推荐(0) 编辑