メインコンテンツへスキップ

Word文書からすべての水平線を削除するにはどうすればよいですか?

水平線は段落を明確に分割できます。 多くのユーザーは、XNUMXつのハイフン、アンダースコア、アスタリスクなどを入力してEnterキーを押すことで、ドキュメントに水平線を追加できることをすでに知っています。 スクリーンショットを参照してください:

docは水平線を削除します1

ドキュメントからすべての水平線を削除するにはどうすればよいですか? このチュートリアルでは、答えを説明します。

すべての水平線をXNUMX本ずつ手動で削除します

VBAコードですべての水平線を削除します

Kutools forWordですべての水平線を削除します


すべての水平線をXNUMX本ずつ手動で削除します

いくつかの水平線を削除したいだけの場合は、次のように手動で削除できます。

1。 カーソルを線の上に置きます。

2。 クリックします。 ページ境界線 の項目 ページの背景 のグループ 設計 タブ;

docは水平線を削除します2

3に設定します。 OK をクリックします。 ボーダーズ タブをクリックします。 なし、クリック OK。 そして、選択した水平線はすぐに削除されます。

docは水平線を削除します3


VBAコードですべての水平線を削除します

ドキュメント内のすべての水平線を削除する場合は、手動で削除するのは面倒です。 VBAを使用すると、次のように簡単に実行できます。

1。 押す Alt + F11 WordでVBAウィンドウを開く。

2に設定します。 OK をクリックします。 モジュール から インセット タブをクリックし、コードをに挿入します モジュール 窓;

VBAコード:Word文書のすべての水平線を削除します。

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

3に設定します。 OK をクリックします。 ラン ボタンまたはプレス F5 VBAを直接適用します。 そして、すべての水平線がドキュメントから削除されました。


Kutools forWordですべての水平線を削除します

ドキュメント全体またはドキュメントの選択からすべての水平線を削除するのが最も簡単です。 Kutools for Word.

Kutools for Word : 100以上の便利なWordアドインがあり、60日以内に制限なしで無料で試すことができます. 

1に設定します。 OK をクリックします。 クツール > 削除します水平線、スクリーンショットを参照してください: 

2。 そして、ドキュメント全体のすべての水平線が一度に削除されます。スクリーンショットを参照してください。

docは水平線を削除します5

Note:水平線の一部を削除したい場合は、範囲データを選択して、この機能を適用してください。

クリックしてKutoolsfor Wordと無料トライアルを今すぐダウンロードしてください!


デモ:Wordのすべての水平線を削除します

Kutools for Word:100以上の便利なWordアドインがあり、60日以内に制限なしで無料で試すことができます。 今すぐダウンロードして無料トライアル!


最高のオフィス生産性向上ツール

Kutools for Word - Over で単語体験を向上させましょう 100 注目すべき機能!

🤖 Kutools AI アシスタント: AI であなたの文章を変革します - コンテンツを生成する  /  テキストを書き換える  /  文書を要約する  /  情報のお問い合わせ 文書に基づいて、すべて Word 内で

📘 ドキュメントマスタリー: 分割ページ  /  ドキュメントをマージする  /  選択内容をさまざまな形式でエクスポート (PDF/TXT/DOC/HTML...)  /  PDFへの一括変換  /  ページを画像としてエクスポート  /  複数のファイルを一度に印刷する...

コンテンツ編集: バッチ検索と置換 複数のファイルにわたる  /  すべての画像のサイズを変更する  /  テーブルの行と列を転置する  /  表をテキストに変換...

🧹 楽にお掃除:振り払って 余分なスペース  /  セクションブレーク  /  すべてのヘッダー  /  テキストボックス  /  ハイパーリンク  / その​​他の取り外しツールについては、当社の Web サイトをご覧ください。 グループを削除...

クリエイティブインサート:挿入 千の区切り文字  /  チェックボックス  /  ラジオボタン  /  QRコード  /  バーコード  /  斜線テーブル  /  方程式のキャプション  /  画像キャプション  /  テーブルキャプション  /  複数の写真  / 詳細については、 グループを挿入...

🔍 正確な選択: ピンポイント 特定のページ  /  テーブル  /  シェイプ  /  見出し段落  / ナビゲーションを強化する 他には? 機能の選択...

スターの強化: あらゆる場所に素早く移動  /  繰り返しのテキストを自動挿入  /  ドキュメントウィンドウをシームレスに切り替える  /  11 変換ツール...

👉 これらの機能を試してみませんか? Kutools for Wordは、 60日無料トライアル、制限なし! 🚀
 
Comments (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
The VBA code returns the error 'compile error: must be first statement on line' for the first line. Any thoughts?
This comment was minimized by the moderator on the site
The VBA code returns the error - compile error: must be first statement on line for the first line.
This comment was minimized by the moderator on the site
The VBA code method worked. Thanks so much!
This comment was minimized by the moderator on the site
Thank you, thank you, thank you! 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
This comment was minimized by the moderator on the site
I love you! OMG. The VBA thing worked!!!! That dump line was driving me crazy.
This comment was minimized by the moderator on the site
140 Ogrady St. Fall River, MA 02720-4911 USA How 3 lines made one line???
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
The manual methods did not work, but the VBA code did. Very nice!
This comment was minimized by the moderator on the site
This is amazing!!! BIG THANK YOU for putting the VBA code. Searched in google but yours was the only thing that came up.
This comment was minimized by the moderator on the site
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.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations