![]() |
|
#1
|
||||
|
||||
![]()
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] |
#2
|
|||
|
|||
![]()
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 " ? |
#3
|
||||
|
||||
![]()
As indicated in my previous post the expression is for a wildcard Find. Did you check the use wildcards option?
Quote:
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 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] |
#4
|
|||
|
|||
![]()
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 |
![]() |
|
![]() |
||||
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 |