![]() |
#5
|
||||
|
||||
![]()
The macro acts on the selected text, so only select the problematic lines. In the case of your example, select only
De Jean, J., Upitis, R., Koch, C., & Young, J. (1999). The story of Phoenix Quest: How girls respond to a prototype language and mathematics computer game. Gender and Education, 11(2). and then run the macro or to do what you asked Code:
Sub RemoveParaOrLineBreaks() Dim oRng As Range Dim oFind As Range Set oRng = Selection.Range Set oFind = Selection.Range With oFind.Find .Replacement.Text = "\1" Do While .Execute(FindText:="[^13^l]{1,}([a-z])", _ MatchWildcards:=True, _ Replace:=wdReplaceAll) Loop End With lbl_Exit: Set oRng = Nothing Set oFind = Nothing Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
John Holstein | Word | 5 | 04-01-2015 09:00 AM |
Line break between en dash and number | 90-degree | Word | 1 | 01-14-2015 01:09 PM |
![]() |
nmss18 | Word | 2 | 09-11-2014 06:07 AM |
![]() |
seeker62 | Word | 3 | 07-22-2013 06:49 PM |
![]() |
wordpunk | Word VBA | 1 | 07-03-2012 03:05 PM |