Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Inserting a Break with a Macro.
Written by Allen Wyatt (last updated October 7, 2021)
This tip applies to Word 97, 2000, 2002, and 2003
You know how to insert breaks in your text manually, but you can also do the same thing under control of your macro. The InsertBreak method inserts any type of break in your document. The syntax is:
Selection.InsertBreak Type:=BreakValue
where BreakValue is one of the following values:
BreakValue | Result | |
---|---|---|
wdPageBreak | Page break | |
wdColumnBreak | Column break | |
wdSectionBreakNextPage | Next-page section break | |
wdSectionBreakContinuous | Continuous section break | |
wdSectionBreakEvenPage | Even-page section break | |
wdSectionBreakOddPage | Odd-page section break | |
wdLineBreak | Line break |
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (744) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Inserting a Break with a Macro.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
If you develop a macro to process your document, you may want the macro to save the document to disk. This is easily done ...
Discover MoreWhen processing text with a macro, you often need to remove extraneous spaces from the text. VBA provides three handy ...
Discover MoreWant to know the absolute value of a number? It's easy to derive in VBA by using the Abs function.
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2015-10-09 02:02:26
Naresh
Hi,
I would like to insert a page break on a string in MS Word.
For Example, if their is word anywhere in a Page like test, then it should be replaced with page break.
It should check all the page and insert the page where ever the word exists.
Please give me your suggestion to resolve this issue.
Thanks,
Naresh
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments