R
RCHaynes
Hi, I'm cross-posting with a vengeance attempting to solve a problem.
I have a log file, that I'm trying to use macros to reformat and segregate
into seperate files. All my subs except one work.
Sub ConvertParagraphs2LineFeeds()
'
' reformat all Paragraphs to Line Feed characters.
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = "^l"
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
When I step through it, everything works until I hit the End Sub statement.
I can see in the doc that all the paragraphs have become linefeeds. But I
can't get the focus back onto the doc. I've even waited for up to 30 minutes,
to see if it just needed to finish repaginating or something.
No matter what I do Word hangs. I have a growth in memory, but I never get
past the 'Not Responding' in Task Manager until I end the process.
I have the same reaction when I try to enter the ^p ^l in the Find and
Replace interface from the Edit menu, so I am suspecting that Word is somehow
skewed, not my macro.
Anyone have any insight?
I have a log file, that I'm trying to use macros to reformat and segregate
into seperate files. All my subs except one work.
Sub ConvertParagraphs2LineFeeds()
'
' reformat all Paragraphs to Line Feed characters.
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = "^l"
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
When I step through it, everything works until I hit the End Sub statement.
I can see in the doc that all the paragraphs have become linefeeds. But I
can't get the focus back onto the doc. I've even waited for up to 30 minutes,
to see if it just needed to finish repaginating or something.
No matter what I do Word hangs. I have a growth in memory, but I never get
past the 'Not Responding' in Task Manager until I end the process.
I have the same reaction when I try to enter the ^p ^l in the Find and
Replace interface from the Edit menu, so I am suspecting that Word is somehow
skewed, not my macro.
Anyone have any insight?