View Single Post
 
Old 09-25-2016, 09:51 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,379
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by billob View Post
Sorry to say, I could not make what you sent work.
As indicated in my previous post the expression is for a wildcard Find. Did you check the use wildcards option?
Quote:
Originally Posted by billob View Post
I have several thousand lines with "several words in between" Always on one line.
How can I find lines that have only one " ?
You could use a macro such as:
Code:
Sub TestQuotes()
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
  With oPara.Range
    If (Len(.Text) - Len(Replace(.Text, Chr(34), vbNullString))) Mod 2 <> 0 Then
      .Select
      MsgBox "Selected paragraph has unmatched plain quotes", vbExclamation
      Exit Sub
    End If
    If Len(Replace(.Text, Chr(147), vbNullString)) <> Len(Replace(.Text, Chr(148), vbNullString)) Then
      .Select
      MsgBox "Selected paragraph has unmatched smart quotes", vbExclamation
      Exit Sub
    End If
  End With
Next
End Sub
The above macro checks each paragraph for any unmatched double-quote characters. Mixes of straight & smart quotes aren't assumed to balance each other – there must be balancing pairs (e.g. "xxx" or “xxx”).

For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
For Mac macro installation & usage instructions, see: http://word.mvps.org/Mac/InstallMacro.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote