Click Run button or press F5 to apply VBA directly. VBA code: Remove all horizontal lines in a Word document: Sub removehline()įor Each ils In ActiveDocument.Paragraphs
#Can delete horizontal line in word code
Click Module from Insert tab, and insert the code into the Module window Press Alt+F11 to open the VBA window in Word Ģ. If you want to remove all horizontal lines in the document, it’s tedious to remove them manually. And the selected horizontal line will be deleted at once. Click on the Page Borders item in the Page Background group of Design tab ģ. If you just want to remove few horizontal lines, you can manually remove them as follows:Ģ. Remove all horizontal lines with Kutools for Word Remove all horizontal lines with VBA code Manually remove all horizontal lines one by one
#Can delete horizontal line in word how to
How to remove all horizontal lines from the document? This tutorial will tell you the answers. Many users already know they can add horizontal lines to document by typing three hyphens, underscore or asterisks and so on, and then pressing Enter. Horizontal lines can divide paragraphs clearly. VBA code: remove footnote and endnote separator lines in document Sub DeleteTheFootnoteSeparator()Ī = wdPaneEndnoteSeparatorĪ to remove all horizontal lines from Word document? Note: If you want to remove all separator lines of footnote and endnote, the below VBA code can help. Then all footnotes’ separator lines are removed immediately from the document. Type = wdWebView Or _Ī = wdSeekFootnotesĪ = wdPaneFootnotesĪ = wdPaneFootnoteSeparatorĪ = wdPaneFootnoteContinuationSeparatorģ.
VBA code: remove footnote separator line in document Sub DeleteTheFootnoteSeparator() Then copy below VBA code into the Module window. In the Microsoft Visual Basic for Applications window, click Insert > Module. In the document you will remove separator line of footnote, press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.Ģ. If the above method is inconvenient for you, you can try the following VBA codes to quickly remove all separator lines of footnote or both footnote and endnote from document.ġ. Remove footnote/endnote separator lines with VBA code Note: To remove the endnote separator line, you just need to check View endnote area in the above Show Notes dialog, and then select Endnote Separator in the Endnotes drop-down list. Then you can see the separator line of footnote is removed immediately from the document.
Shift to the Print Layout view of the document. Now the Notes section is displaying at the end of the document, please select Footnote Separator in the Footnotes drop-down list, select the separator line and then press the Delete key to delete it. Note: If only footnote or endnote existing in your document, ignore this step and move to step 4.Ĥ. If there are both footnotes and endnotes in your document, a Show Notes dialog box will pop up, please select an option as you need and then click the OK button. Then click References > Show Notes as below screenshot shown.ģ. In the document you will remove its footnote or endnotes separator line, click View > Draft.Ģ. You can remove footnote or endnote separator line in Word as follows.ġ. Remove footnote/endnote separator line with VBA code Remove footnote/endnote separator line in Word If you want to get rid of these separator lines, please try methods in this article. When inserting footnotes or endnotes in Word document, you will find there is always a horizontal separator line above the footnote or endnotes texts. How to remove the footnote/endnote separator line in Word document?