Microsoft KB Archive/212277

= WD2000: InsertBreak Statement Inserts Unexpected Carriage Return =

Article ID: 212277

Article Last Modified on 6/17/2005

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q212277





SYMPTOMS
When you run a macro that uses the WordBasic.InsertBreak statement following a WordBasic.Insert statement, Word inserts a paragraph mark after the inserted text. This behavior is different from versions of Word earlier than Word 97.



WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

To work around this problem, add the Type:=0 parameter as in the following example: Sub InsertBreakExample WordBasic.FileNewDefault WordBasic.Insert "This is some text" WordBasic.InsertBreak Type:=0 End Sub or use the following Visual Basic for Applications equivalent: Sub InsertBreakExample Documents.Add Selection.TypeText "This is some text" Selection.InsertBreak Type:=0 End Sub



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: winword vba vb vbe

Keywords: kbbug kbprogramming kbdtacode kbpending KB212277

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.