Microsoft KB Archive/67986

Inserting Paragraph Marks with the Macro Language PSS ID Number: Q67986 Article last modified on 07-14-1994

1.00 1.10 1.10a 2.00 2.00a 2.00a-CD 2.00b 2.00c

WINDOWS

Summary:

To insert a paragraph mark in a document in Word for Windows using the macro language, the InsertPara statement should always be used to ensure that proper formatting is preserved in the document.

The Insert Chr$(13) + Chr$ (10) combination, which inserts the carriage return and linefeed, should not be used to insert a paragraph return in a document.

The InsertPara statement is the only way a paragraph return should be inserted into a document using the macro language.

Chr$(13) is the carriage return control code and Chr$ (10) is the line feed control code. Use these control codes for comparison purposes only. For example, the following macro determines if the current paragraph is blank or empty.

Sub MAIN EditGoTo “” ’selects the current paragraph IfSelection$ = Chr$ (13) + Chr$(10) Then MsgBox “Paragraph is blank” End Sub

Reference(s):

“Microsoft Word for Windows Technical Reference,” page 207, Microsoft Press, 1990.

Additional reference words: w4wmacro winword

=
================================================================

Copyright Microsoft Corporation 1994.