如何在Word 2016中添加文本?
时间:2023-07-25 05:05:42
如何在Word 2016中添加文本?当你在Word 2016写,特别是如果你在一个学术文章,甚至一个大的虚构作品,那么您可能想秒杀大文本,而不是将其删除。要添加文本,请选择它,然后将其向下移动到文档末尾。当您“完成”写作时,请查看峰值以查看是否值得保存。
以下是使过程自动化的spike_text宏的代码:
Sub spike_text()
‘
‘ spike_text Macro
‘ Move selected text to the end of the document
‘
If Selection.Type = wdSelectionNormal Then
Selection.Cut
Selection.EndKey Unit:=wdStory
Selection.TypeParagraph
Selection.Paste
Application.GoBack
Application.GoBack
Else
MsgBox “Nothing to spike”
End If
End Sub
该宏包含if-else结构。所述如果测试确定文本是否被选择。如果是这样,则将文本剪切并粘贴到文档末尾。如果未选择文本,则等式的其他部分将显示一个带有文本“ Nothing to刺的消息”的消息框。
最初记录了此宏,并使用了以下击键:
Ctrl + X
Ctrl +结束
Ctrl + V
Shift + F5,Shift + F5
Shift + F5键盘快捷键可将您返回到文档中的上一个编辑位置。
记录击键之后,添加了if-else结构,以确保当未选择文本时宏不会显示难看的错误消息。此过程是防御性编程的一部分,在该过程中,您预计并非每个宏都在理想条件下启动。在这种情况下,不理想的条件是未选择文本。
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
打开Word,弹出提示"发送错误报告"的修复的方法
![](https://img.aspxhome.com/file/2023/1/21231_0s.jpg)
电脑系统坏了怎么修复win10?电脑系统坏了修复win10教程
![](https://img.aspxhome.com/file/2023/3/48093_0s.jpg)
VMware软件如何创建Win10虚拟机?VMware软件创建Win10虚拟机方法简述
![](https://img.aspxhome.com/file/2023/4/48854_0s.jpg)
无主之地3win10未响应怎么处理?无主之地3win10未响应的解决教程
![](https://img.aspxhome.com/file/2023/0/47530_0s.jpg)
如何用word做动态贺卡
WPS中如何调节字间距
![](https://img.aspxhome.com/file/2023/7/a163637_0s.jpg)
win10系统应用商店打不开的解决方法
![](https://img.aspxhome.com/file/2023/2/47132_0s.png)
Win10哪个版本占用空间最小?
![](https://img.aspxhome.com/file/2023/7/50577_0s.jpg)
windows10死机怎么办?windows10死机处理教程
![](https://img.aspxhome.com/file/2023/9/48079_0s.jpg)
Win10系统ping时出现传输失败常见故障?这招收好了
![](https://img.aspxhome.com/file/2023/2/48962_0s.jpg)
Win10电脑屏幕出现彩色条纹怎么办?电脑屏幕出现彩色条纹解决方法
![](https://img.aspxhome.com/file/2023/3/50433_0s.png)
巧用Word引用加密网页 保护隐私
WPS怎么绘制组织结构图
![](https://img.aspxhome.com/file/2023/6/53466_0s.jpg)
WORD怎样设置每页不同的页眉
![](https://img.aspxhome.com/file/2023/7/20457_0s.jpg)
Word2003文档中字数统计在哪?
![](https://img.aspxhome.com/file/2023/9/18089_0s.jpg)
宽带连接651错误是什么意思?宽带连接651错误详解
![](https://img.aspxhome.com/file/2023/8/47908_0s.png)
word2010怎么把doc转为html格式
![](https://img.aspxhome.com/file/2023/5/17215_0s.jpeg)
Win10系统提示DRIVER_IRQL怎么办?Win10系统提示DRIVER_IRQL解决方法
![](https://img.aspxhome.com/file/2023/5/48435_0s.png)
iOS 16测试版值得升级吗?附iOS 16升级方法
![](https://img.aspxhome.com/file/2023/8/45388_0s.png)
360安全卫士关闭主动防御的步骤教程
![](https://img.aspxhome.com/file/2023/6/53296_0s.png)