没有合适的资源?快使用搜索试试~ 我知道了~
首页关于光标移动在VBA中的教程
资源详情
资源评论
资源推荐

在 WORD 中如何用 VBA 宏语言选定一行、一段,删除一行、一段,移动光标至行首、行
尾、段首、段尾等。请看以下内容。Sub MoveToCurrentLineStart()
'移动光标至当前行首
Selection.HomeKey unit:=wdLine
End SubSub MoveToCurrentLineEnd()
'移动光标至当前行尾
Selection.EndKey unit:=wdLine
End SubSub SelectToCurrentLineStart()
'选择从光标至当前行首的内容
Selection.HomeKey unit:=wdLine, Extend:=wdExtend
End SubSub SelectToCurrentLineEnd()
'选择从光标至当前行尾的内容
Selection.EndKey unit:=wdLine, Extend:=wdExtend
End SubSub SelectCurrentLine()
'选择当前行
Selection.HomeKey unit:=wdLine
Selection.EndKey unit:=wdLine, Extend:=wdExtend
End SubSub MoveToDocStart()
'移动光标至文档开始
Selection.HomeKey unit:=wdStory
End SubSub MoveToDocEnd()
'移动光标至文档结尾
Selection.EndKey unit:=wdStory
End SubSub SelectToDocStart()
'选择从光标至文档开始的内容
Selection.HomeKey unit:=wdStory, Extend:=wdExtend
End SubSub SelectToDocEnd()
'选择从光标至文档结尾的内容
Selection.EndKey unit:=wdStory, Extend:=wdExtend
End SubSub SelectDocAll()
'选择文档全部内容(从 WholeStory 可猜出 Story 应是当前文档的意思)
Selection.WholeStory
End SubSub MoveToCurrentParagraphStart()
'移动光标至当前段落的开始
Selection.MoveUp unit:=wdParagraph
End SubSub MoveToCurrentParagraphEnd()
'移动光标至当前段落的结尾
Selection.MoveDown unit:=wdParagraph
End SubSub SelectToCurrentParagraphStart()
'选择从光标至当前段落开始的内容
Selection.MoveUp unit:=wdParagraph, Extend:=wdExtend
End SubSub SelectToCurrentParagraphEnd()
'选择从光标至当前段落结尾的内容
Selection.MoveDown unit:=wdParagraph, Extend:=wdExtend



















Mercury8316
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- ARM Cortex-A(armV7)编程手册V4.0.pdf
- ABB机器人保养总结解析.ppt
- 【超详细图解】菜鸡如何理解双向链表的python代码实现
- 常用网络命令的使用 ipconfig ping ARP FTP Netstat Route Tftp Tracert Telnet nslookup
- 基于单片机控制的DC-DC变换电路
- RS-232接口电路的ESD保护.pdf
- linux下用time(NULL)函数和localtime()获取当前时间的方法
- Openstack用户使用手册.docx
- KUKA KR 30 hA,KR 60 hA机器人产品手册.pdf
- Java programming with JNI
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论1