
Tips.Net > WordTips Home > Macros > VBA Examples > Inserting a Break with a Macro
Summary: How to insert different types of breaks within a VBA macro. (This tip works with Microsoft Word 97, Word 2000, Word 2002, and Word 2003.)
You know how to insert breaks in your text using menu commands, but you can also do the same thing under control of your VBA 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 |
Tip #744 applies to Microsoft Word versions: 97 2000 2002 2003
Great Idea! Word is a tool to get what you really want—printed output. This means you need to make sure that Word works as well as possible with your printer, whether it is sitting on your desk or in a room down the hall.
Check out WordTips: Printing and Printers today!
If you provide support and help to others, you need the power offered in the WordTips Ten-Year Library. There is no better information repository anywhere! (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips