提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何从Word文档中删除所有水平线?

水平线可以清楚地划分段落。 许多用户已经知道他们可以通过输入三个连字符,下划线或星号等来添加水平线,然后按Enter键。 看截图:

doc删除水平线1

如何从文档中删除所有水平线? 本教程将告诉你答案。

手动逐个删除所有水平线

用VBA代码删除所有水平线

用Kutools for Word删除所有水平线


从Word文档中删除所有水平线:

您订购的 Kutools for Word's 水平线 功能,只需点击一下鼠标即可从Word文档中删除各种水平线。

doc删除水平线6

Kutools for Word:拥有超过100便利的Word插件,可以免费试用60时间不受限制。 点击下载并免费试用现在!


手动逐个删除所有水平线

如果你只是想删除几条水平线,你可以手动删除它们,如下所示:

1。 将光标放在该行的上方;

2。 点击 页面边框 项目中 页面背景 一群 设计 标签;

doc删除水平线2

3。 点击 国界 标签,点击 没有,单击“ OK。 所选的水平线将被一次删除。

doc删除水平线3


用VBA代码删除所有水平线

如果你想删除文档中的所有水平线,手动删除它们是很繁琐的。 VBA可以使它更容易,做如下:

1。 按 Alt + F11 在Word中打开VBA窗口;

2。 点击 模块 前往 插页 选项卡,并将代码插入到 模块 窗口;

VBA代码:删除Word文档中的所有水平线:

Sub removehline()Dim ils As Para As For Each ils In ActiveDocument.Paragraphs ils.Borders(wdBorderBottom).LineStyle = wdLineStyleNone Next ils End Sub

3。 点击 按钮或按下 F5 直接应用VBA。 并且所有水平线已从文档中删除。


用Kutools for Word删除所有水平线

最简单的方法是从整个文档或文档选择中删除所有水平线 Kutools for Word.

Kutools for Word : 有超过100便利的Word插件,可以在60天免费试用而没有限制.

1。 点击 kutools > 水平线 来自 删除 组,请参阅截图:

doc删除水平线4

2。 然后,整个文档中的所有水平线将立即被删除,请参阅截图:

doc删除水平线5

注意:如果要删除部分水平线,请选择范围数据,然后应用此功能。

点击下载Kutools for Word并免费试用!


演示:删除Word中的所有水平线

Kutools for Word:拥有超过100便利的Word插件,可以免费试用60时间不受限制。 立即下载并免费试用!




推荐的Word生产力工具

Kutools For Word - 超过100 Word的高级功能,节省您的50%时间

  • 复杂和重复的操作可以在几秒钟内完成一次性处理。
  • 一次将多个图像跨文件夹插入Word文档。
  • 将多个文件夹合并并组合成一个具有所需订单的文件。
  • 根据标题,分节符或其他标准将当前文档拆分为单独的文档。
  • 在Doc和Docx,Docx和PDF之间转换文件,用于常见转换和选择的工具集合等等......
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Matt Etherington · 10 months ago
    The VBA code returns the error 'compile error: must be first statement on line' for the first line. Any thoughts?
  • To post as a guest, your comment is unpublished.
    Matt · 10 months ago
    The VBA code returns the error - compile error: must be first statement on line for the first line.
  • To post as a guest, your comment is unpublished.
    Izza · 2 years ago
    The VBA code method worked. Thanks so much!
  • To post as a guest, your comment is unpublished.
    Drew · 3 years ago
    [b]Thank you, thank you, thank you! [/b] I have a multi-gigabyte library of DOCX files that use horizontal lines (=== and ---) as internal section dividers. Thanks to your tip (perhaps the only instance on the web?) I will be able to programmatically split these documents into sub-files.

    Thanks again
  • To post as a guest, your comment is unpublished.
    Brooke · 3 years ago
    I love you! OMG.
    The VBA thing worked!!!!

    That dump line was driving me crazy.
  • To post as a guest, your comment is unpublished.
    sojib · 4 years ago
    140 Ogrady St.
    Fall River, MA 02720-4911
    USA
    How 3 lines made one line???
  • To post as a guest, your comment is unpublished.
    fandoog · 4 years ago
    None of this page border stuff worked at all. I searched the document. The horizontal line was at the end, and 10 pages earlier was the culprit, a roman paragraph number lurking in a sentence for no reason at all. When I deleted it it removed the line 10 pages away.
    I will cut and pate the bugger here. In fact, you can have a set of them from 1 to 6. The then put a line at the bottom of every page. Go figure. MS Word 2007 is the platform.


    They are there, but do not display. They are just above this line, and will highlight if you mouse over.
  • To post as a guest, your comment is unpublished.
    Carski7 · 4 years ago
    The manual methods did not work, but the VBA code did. Very nice!
  • To post as a guest, your comment is unpublished.
    Codelover 26 · 4 years ago
    This is amazing!!! BIG THANK YOU for putting the VBA code.
    Searched in google but yours was the only thing that came up.
  • To post as a guest, your comment is unpublished.
    sharon · 4 years ago
    OMG! Thank you. I ran a macro as instructed and managed to remove the line. You were the onlly site among 3 to propose this solution.
  • To post as a guest, your comment is unpublished.
    IMKarla · 5 years ago
    My Word doc is generated from RoboHelp. Somewhere in there is a horizontal line, not a border. The doc is 1300+ pages. I searched for graphic one at a time and did not find it. Then I used your macro, and it failed at ils.Borders(wdBorderBottom).LineStyle = wdLineStyleNone. I have lots and lots of tables, so I'm glad it failed. :eek: I really just want to know what the VB script is for horizontal line (not border).
  • To post as a guest, your comment is unpublished.
    Chris · 5 years ago
    3 "pound signs" won't do anything. 3 pound signs are £££. That does not create any line. I think you mean 3 HASH signs (otherwise known as number signs): ###
    • To post as a guest, your comment is unpublished.
      admin_jay · 5 years ago
      [quote name="Chris"]3 "pound signs" won't do anything. 3 pound signs are £££. That does not create any line. I think you mean 3 HASH signs (otherwise known as number signs): ###[/quote]
      Yes, you are right. 3 HASH signs + Enter