Why is this search not working in MS Word 2016?

0

1

I have a large document (1000 pages) and I need to replace every « at the beginning of a word with a » (ALT+0187).

When I want to search a document for the character W at the beginning of a word, I use

<(W)

Why can't I search for the character « (that's ALT+0171 on MS Windows) in the same way?

<(«)   // does not find anything

My search query does not hit on something like «But

WAJurczyk

Posted 2017-02-02T00:16:41.477

Reputation: 21

1« is a punctuation character, so it is never part of a word: in your case it precedes the beginning of a word. – AFH – 2017-02-02T01:36:06.463

Right, that was the problem. I wrote up an answer with the correct solution. – WAJurczyk – 2017-02-02T11:46:28.263

Answers

2

As AFH and Yisroel Tech noticed, a word can never begin with «, so the beginning of the word follows the chevron.

The final find string has to be simply «<.

and the results can be replaced by ».

WAJurczyk

Posted 2017-02-02T00:16:41.477

Reputation: 21

1

You could try to escape the character with \ or check out this help page for searching/replacing special characters in a word document if you didn't try already:

http://www.officetooltips.com/word/tips/replacing_special_characters.html

r3r57

Posted 2017-02-02T00:16:41.477

Reputation: 66

Sorry, escaping didn't help, but I found the problem with my search string. – WAJurczyk – 2017-02-02T11:45:47.303

1

As @AFH notes « isn't a character that is part of a word because it is considered punctuation.

As an alternative way of accomplishing what you want to do, though not sure if it'll be good enough in your situation, you can use ([^13- ])(«)([! ]) as the Find string and Replace with \1»\3. This will find you any « that is after space or paragraph, and is not followed by a space, so that'll probably cover all the « at the beginning of words and not « in middle of words or alone.

Just BTW, the character « and » ate not ALT+0187 and ALT+0171 (these are "Latin Capital Letter C With Hook" and "Latin Small Letter U With Double Acute" respectively.) The correct Unicode for « and » are 00AB and 00BB.

Yisroel Tech

Posted 2017-02-02T00:16:41.477

Reputation: 4 307

Thanks, you're right. But I found a very simple solution for a working find string. About the ALT-codes: Interestingly, on my wife's German-setup Windows machine, the ALT-codes I provided yield the two chevrons! I'm sorry for not noticing there is localization issue. – WAJurczyk – 2017-02-02T11:47:19.663