Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2015, 06:22 AM
Rob_001 Rob_001 is offline Windows XP Office 2007
Novice
 
Join Date: Oct 2015
Posts: 5
Rob_001 is on a distinguished road
Default Finding a word or phrase in a fiction book's prose without searching characters’ dialogue


Hi, hope someone can help me. I'm not sure if this is even possible. I have MS Word 2007 and I'm looking to edit a fiction book and need to search for various different words and phrases to improve the book's prose, however I dont want to search for these words and phrases in the characters' dialogue. Is this possible? bearing in mind I am English and all the character dialogue is contained/enclosed within single speech marks rather than double marks as are typically used in the U.S. (not that this should make much difference for the search).

Furthermore, if this can be done, would it also be possible to also exclude all italic words from the search as this will exclude searching the characters' thoughts which I want to bypass as well?

Hope someone can help as this could save me a massive amount of time, although I fear it may require a macro of some type to achieve.
Yours sincerely
Rob
Reply With Quote
  #2  
Old 10-23-2015, 01:55 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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

Assuming your dialogue uses smart quotes, you could exclude text in dialogues by coding a wildcard Find/Replace like:
Find = (^0148[!^0147]@)text to find
Replace = \1replacement text

It is also possible, to exclude italics, by setting the font parameters for the Find.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-24-2015, 04:55 AM
Rob_001 Rob_001 is offline Windows XP Office 2007
Novice
 
Join Date: Oct 2015
Posts: 5
Rob_001 is on a distinguished road
Default

Hi Paul, thanks for the help it's much appreciated. I tried your suggestion and subbed in the single curly speech marks and it worked to an extent, but there are problems with dialogue which contain words with apostrophes in. for instance, I searched for the word 'very' using the following formula with wildcards selected: (^0146[!^0145]@) very

And the find function highlighted the text I've marked in red below which is inside the dialogue. Obviously the extra speech mark used as an apostrophe causes the issue and now I wish I was American and used the double speech marks as this would bypass the issue. However, as I need to stay with UK standards changing the speech marks is not an option, so with this in mind can you see a way round this problem?

‘If that’s your argument,’ Walker said, ‘it’s not very convincing.’

Looking at it I would imagine it needs some kind of IF command, i.e. IF the apostophe ^0146 is followed by anything except white space then ignore, which would also bypass other words like they're, won't etc. Although knowing what I need to do and putting into practise are two VERY different things.
Reply With Quote
  #4  
Old 10-24-2015, 05:20 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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

The problem with using single quotes as you have done is that it is impossible to distinguish their use as apostrophes or scare-quotes from speech. Even crafting a F/R expression to exclude word ending in 's (not that I believe such would be possible) wouldn't help with words ending in s'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 10-24-2015, 03:37 PM
Guessed's Avatar
Guessed Guessed is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Assuming your document doesn't use local formatting or character styles, I would try to separate this task into two parts
1. Tag all dialog with a character style (it doesn't need any attributes so this could be formatting-neutral)
2. Search for your term with default paragraph font style

In your example, you could separate the apostrophes from a dialogue close quote by the punctuation that precedes it. If that punctuation is consistent in your document that should work.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #6  
Old 10-24-2015, 04:07 PM
Rob_001 Rob_001 is offline Windows XP Office 2007
Novice
 
Join Date: Oct 2015
Posts: 5
Rob_001 is on a distinguished road
Default

Thanks Paul, yeh sadly UK formatting convention on books using single speech marks is my downfall. Looks like I'll have to do it the hard way, although the formula you gave me is still useful, it'll just take a little bit longer than I envisaged, but I'm sure it will still save me time so thanks again for your help, as I said before its much appreciated.

Hi Andrew, thanks for the advice as well, although I fear allocating all dialogue with a style would almost be as much work as what I'm already doing as the book is 1300 pages long, we'll its actually become two books, but the length is the same, either way it wouldn't be quick. Although I didn't really understand what you meant when you said I could separate the apostrophes from a dialogue close quote by the punctuation that precedes it, I take you meant if I had charcter styles for dialogue I could do this?
Reply With Quote
  #7  
Old 10-25-2015, 04:06 AM
Guessed's Avatar
Guessed Guessed is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I meant that a closing quote that is preceded by a full stop or a comma can be assumed to be the close of an actors speech whereas one preceded by a letter a-z would be an apostrophe. This pattern would allow you to modify a wildcard string to more accurately identify speech.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #8  
Old 10-25-2015, 04:26 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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

Taking that approach, you might try a wildcard Find/Replace with:
Find = (^0145[!^0145]@)text to find([!^0146.,\?\!]@[.,\?\!][^0146])
Replace = \1replacement text\2
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 10-25-2015, 11:36 AM
Rob_001 Rob_001 is offline Windows XP Office 2007
Novice
 
Join Date: Oct 2015
Posts: 5
Rob_001 is on a distinguished road
Default

Ah right, I see what you mean, Andrew, good thinking. And Paul, thanks for the formula too, although I tried it and it seems to do the opposite to what I need, hence it picks up the word inside the dialogue only, which might be useful in itself to me at some point and it's obviously solved the issue of separating dialogue from prose but the wrong way round. Is there anyway to invert the formula's product do you think? Looking at it makes my head hurt.
Reply With Quote
  #10  
Old 10-25-2015, 01:45 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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

If you define a Style for your dialogues (probably a character Style), you could use a wildcard Find/Replace with:
Find = ^0145[!^0145]@[.,\?\!][^0146]
Replace = ^&
and specify your dialogue Style as the replacement Style.

Having done that, you could use an ordinary Find/Replace to look for your content in whatever other Style the rest of your document uses for the body text.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #11  
Old 10-26-2015, 12:41 PM
Rob_001 Rob_001 is offline Windows XP Office 2007
Novice
 
Join Date: Oct 2015
Posts: 5
Rob_001 is on a distinguished road
Thumbs up

Aha, eureka! It works, that's fantastic guys, thanks so much for your help this will serve me well and will save me a lot of work and a lot of screen staring too. Thanks again, you're a couple of stars!


p.s. if you ever need some writing advice/help just drop me a message, not sure if I will be able to help but I'd give it my full attention.


Cheers fellas!
Rob
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching Emails, finding from Thom or Harry wings1080 Outlook 1 09-29-2015 12:25 PM
Getting a single word or phrase to animate jmhultin PowerPoint 2 06-05-2015 08:09 AM
Need help searching without defined characters borninscorpio Excel 1 07-29-2013 11:50 AM
Finding or searching ^ character in word document shahin3121 Word 2 03-05-2012 06:16 PM
Junk characters (box-like characters) in Word file Sashikala Word 1 04-20-2010 02:03 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:04 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