Microsoft KB Archive/70118

Searching, Replacing Paragraph Indents Doesn’t Work with Macro

PSS ID Number: Q70118 Article last modified on 02-18-1993

1.00 1.10 WINDOWS

Summary: Searching and replacing paragraph indents in a macro does not work. Microsoft has confirmed this to be a problem in Word for Windows versions 1.00 and 1.10. We are researching this problem and will post new information here as it becomes available.

More Information: The following macro should allow you to search for 2-inch left indented paragraphs and change them to 1-inch left indents. Although it finds any 2-inch left indented paragraphs and asks if you want to replace them, it fails to make the change. Sub MAIN EditSearchPara .LeftIndent = “2” EditReplacePara .LeftIndent = “1.5” EditReplace .Search = &quot;“, .Replace =”“, .Format = 1 End Sub Similarly, replacing right or first line indents also fail. Replacing other paragraph formatting properties with the EditSearchPara command, works as described in the”Microsoft Word for Windows Technical Reference.&quot;

Reference(s): “Microsoft Word for Windows Technical Reference,” page 44, “EditReplacePara” section (brown cover).

Additional reference words: w4wmacro