Morning,
Having problem troubleshooting this simple macro: I
Morning,
Having problem troubleshooting this simple macro: I

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
There are several problems with your macro.
Here is an improved version:
With Selection.Find
.Text = "^p"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
Selection.MoveLeft Unit:=wdSentence
Remarks:
<UL><LI>This is not a wildcard search, so I have set the find text to "^p" and MatchWildcards to False
<LI>I have put the Execute within the With ... End With block
<LI>.MoveLeft is invalid outside a With ... End With block
<LI>wdParagraph is not valid for MoveLeft, it is intended for MoveUp or MoveDown
<LI>Since you want the cursor to be an IP, you should not use wdExtend.[/list]
Perfect! Many, many thanks, HansV