惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
Project Zero
Project Zero
T
Tailwind CSS Blog
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
C
Cisco Blogs
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Heimdal Security Blog
博客园 - 【当耐特】
W
WeLiveSecurity
J
Java Code Geeks
Latest news
Latest news
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
博客园 - Franky
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
PCI Perspectives
PCI Perspectives
博客园_首页
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
P
Palo Alto Networks Blog
I
InfoQ
Security Latest
Security Latest
Hacker News: Ask HN
Hacker News: Ask HN
Microsoft Azure Blog
Microsoft Azure Blog
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
F
Full Disclosure
Cyberwarzone
Cyberwarzone
D
DataBreaches.Net
The Cloudflare Blog
S
Securelist
美团技术团队
C
Cybersecurity and Infrastructure Security Agency CISA
AI
AI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events

博客园 - 而且

参考网上例子,在PPT中批量设置m3的3为上标的VBA 分享自己动手弄的基于Rime的新世纪五笔输入法码表 快速设置IP的脚本 word中设置首行缩进的快捷键 加密的encrypted.google.com不能访问的解决方法 安装CASS后CAD的快捷键与工具栏恢复方法(含ctrl+z,复制、粘贴等) 在word2010里裁剪cad等图像 解决奇妙的Dell显示器屏幕闪的问题 批量替换excel里的软回车 360,你还能再流氓一点吗? Google Earth批量生成地标文件(kml)的Excel VBA代码 [转]Arcgis制作泰森多边形具体步骤 删除word中的参考文献引用标记 Aquaveo.GMS.v7.1.3.0.x86-REDT 修改的2010版word与excel的菜单,把常用的提取了出来 转一个按月统计的SQL语句 amChart图形控件在asp.net中的使用 [转]如何让Firefox优化得比Chrome更快 [转]免费网站推广
word中几个好用的宏代码(立方米上标、关闭样式自动更新、删除无效样式、表格加粗边框、宋体引号)
而且 · 2013-12-21 · via 博客园 - 而且
  1 Sub 替换立方米()
  2     With Selection.Find
  3         .Text = "m3"
  4         .Replacement.Text = "mm3"
  5         .Forward = True
  6         .Wrap = wdFindContinue
  7         .Format = True
  8         .MatchCase = False
  9         .MatchWholeWord = False
 10         .MatchByte = False
 11         .MatchWildcards = False
 12         .MatchSoundsLike = False
 13         .MatchAllWordForms = False
 14     End With
 15     Selection.Find.Execute Replace:=wdReplaceAll
 16     With Selection.Find.Replacement.Font
 17         .Superscript = True
 18         .Subscript = False
 19     End With
 20     With Selection.Find
 21         .Text = "m3"
 22         .Replacement.Text = "3"
 23         .Forward = True
 24         .Wrap = wdFindContinue
 25         .Format = True
 26         .MatchCase = False
 27         .MatchWholeWord = False
 28         .MatchByte = False
 29         .MatchWildcards = False
 30         .MatchSoundsLike = False
 31         .MatchAllWordForms = False
 32     End With
 33     Selection.Find.Execute Replace:=wdReplaceAll
 34 End Sub
 35 
 36 '关闭样式自动更新
 37 Sub CloseAutoUpdates()
 38     Dim update As Style
 39     Set Updates = ActiveDocument.Styles
 40     For Each update In Updates
 41         If update.Type = wdStyleTypeParagraph Then
 42             update.AutomaticallyUpdate = False
 43         End If
 44     Next
 45 End Sub
 46 
 47 Sub 删除无效样式()
 48     For Each objStyle In ActiveDocument.Styles
 49     On Error Resume Next
 50         If objStyle.BuiltIn = False And objStyle.InUse = True Then
 51              objStyle.Delete 
 52         End If
 53     Next
 54 End Sub
 55 Sub 表格加粗边框()
 56 '
 57 ' 表格加粗边框 宏
 58 ' 设置表格加粗边框
 59 '
 60     With Selection.Tables(1)
 61         With .Borders(wdBorderLeft)
 62             .LineStyle = wdLineStyleSingle
 63             .LineWidth = wdLineWidth150pt
 64             .Color = wdColorAutomatic
 65         End With
 66         With .Borders(wdBorderRight)
 67             .LineStyle = wdLineStyleSingle
 68             .LineWidth = wdLineWidth150pt
 69             .Color = wdColorAutomatic
 70         End With
 71         With .Borders(wdBorderTop)
 72             .LineStyle = wdLineStyleSingle
 73             .LineWidth = wdLineWidth150pt
 74             .Color = wdColorAutomatic
 75         End With
 76         With .Borders(wdBorderBottom)
 77             .LineStyle = wdLineStyleSingle
 78             .LineWidth = wdLineWidth150pt
 79             .Color = wdColorAutomatic
 80         End With
 81         With .Borders(wdBorderHorizontal)
 82             .LineStyle = wdLineStyleSingle
 83             .LineWidth = wdLineWidth075pt
 84             .Color = wdColorAutomatic
 85         End With
 86         With .Borders(wdBorderVertical)
 87             .LineStyle = wdLineStyleSingle
 88             .LineWidth = wdLineWidth075pt
 89             .Color = wdColorAutomatic
 90         End With
 91         .Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
 92         .Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
 93         .Borders.Shadow = False
 94     End With
 95     With Options
 96         .DefaultBorderLineStyle = wdLineStyleSingle
 97         .DefaultBorderLineWidth = wdLineWidth150pt
 98         .DefaultBorderColor = wdColorAutomatic
 99     End With
100 End Sub
101 Sub 宋体引号()
102 '
103 ' 宋体引号 宏
104 ' 把所有引号改为宋体
105 '
106     Selection.Find.ClearFormatting
107     Selection.Find.Replacement.ClearFormatting
108     With Selection.Find
109         .Text = "[" & ChrW(8220) & ChrW(8221) & "]"
110         .Replacement.Text = ""
111         .Forward = True
112         .Wrap = wdFindContinue
113         .Format = True
114         .MatchCase = False
115         .MatchWholeWord = False
116         .MatchByte = False
117         .MatchAllWordForms = False
118         .MatchSoundsLike = False
119         .MatchWildcards = True
120         .Replacement.Font.Name = "宋体"
121     End With
122     Selection.Find.Execute Replace:=wdReplaceAll
123 End Sub

使用时打开word,按alt+f11,粘贴上去,要用哪个就把鼠标点到哪个sub里,然后f5,搞定!

PS:以上有些是网上别人的,有的是我自己录制的,具体记不清了。如有冒犯,请通知我删除!