Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-24-2016, 11:52 PM
macropod's Avatar
macropod macropod is offline Can't search for--- Windows 7 64bit Can't search for--- Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
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

That really depends on what types of dashes you're working with. Some of these might superficially look the same:
- − ― – —


but they actually consist of a:
• hyphen
• minus sign
• horizontal bar
• en-dash
• em-dash
To cater for all these possibilities you could use a wildcard Find, where:
Find = ^t[\-\−\―\–\—]{3}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 09-25-2016, 09:16 AM
billob billob is offline Can't search for--- Windows 7 64bit Can't search for--- Office 2003
Novice
Can't search for---
 
Join Date: Sep 2016
Posts: 10
billob is on a distinguished road
Default

Hi Paul:

Thank you for your response.

This is absolutely crazy!

Sorry to say, I could not make what you sent work.

Today my Find --- (the the lower half of the underscore key) works just fine like
I thought it should have in the first place.

Now for the toughie?

I have several thousand lines with "several words in between" Always on one line.
How can I find lines that have only one " ?
Reply With Quote
  #3  
Old 09-25-2016, 09:51 PM
macropod's Avatar
macropod macropod is offline Can't search for--- Windows 7 64bit Can't search for--- Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
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
  #4  
Old 09-26-2016, 09:02 AM
billob billob is offline Can't search for--- Windows 7 64bit Can't search for--- Office 2003
Novice
Can't search for---
 
Join Date: Sep 2016
Posts: 10
billob is on a distinguished road
Default

Hi Paul:

Thanks again for your help.

Yes, The wildcard box was the first thing I checked for when it did not work.

That said, it worked perfectly today.

I have been using this Find function for umpteen years and it has always had a
way of sometimes not finding something I know is there. When this happens, I test by asking it to find any alpha or numeric character that I am currently viewing and if it comes up 'no find' I shut down Word and then reboot.

If I simply restart Word, when I click find, the last thing I searched for will still
be there, Hence the Reboot.

Having never used Word's Macro thing I'll have to give it a try.

Many years ago I was fairly successful with Excel Macros.

Cheers,
Billob
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Use CSV as search criteria for Outlook search folder lonesoac0 Outlook 0 03-07-2016 02:31 PM
Onenote 2013 search is not identifying search terms correctly Delta223 OneNote 0 08-12-2014 06:40 AM
Search for date and then apply mutliple search criteria in huge dataset maxtymo Excel 2 12-01-2013 04:52 AM
Looking for Windows Search app with ability to search by content gopher_everett Office 1 02-28-2013 09:23 PM
Search and Replace - Clear Search box JostClan Word 1 05-04-2010 08:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft