如何通过VBA将选择范围扩展到整个段落 [英] How to Extend Selection to whole paragraph via VBA

查看:153
本文介绍了如何通过VBA将选择范围扩展到整个段落的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此代码将选择范围扩展到word文档的整行,现在我想将选择范围扩展到整个段落

I am using this code to extend selection to whole line on word document, Now I want to extend selection to whole paragraph

Selection.Expand wdLine

推荐答案

尝试使用其他wdUnit(如wdParagraph):

Try using a different WdUnit like wdParagraph:

Selection.Expand wdParagraph

有关不同WdUnit的概述,请参见以下链接: https://msdn.microsoft.com/en-us/library/office/ff838950.aspx

See this link for an overview of the different WdUnits: https://msdn.microsoft.com/en-us/library/office/ff838950.aspx

这篇关于如何通过VBA将选择范围扩展到整个段落的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆