Advanced Find and Replace in Microsoft Word.docx

上传人:b****2 文档编号:732872 上传时间:2023-04-29 格式:DOCX 页数:35 大小:35.03KB
下载 相关 举报
Advanced Find and Replace in Microsoft Word.docx_第1页
第1页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第2页
第2页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第3页
第3页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第4页
第4页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第5页
第5页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第6页
第6页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第7页
第7页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第8页
第8页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第9页
第9页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第10页
第10页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第11页
第11页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第12页
第12页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第13页
第13页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第14页
第14页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第15页
第15页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第16页
第16页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第17页
第17页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第18页
第18页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第19页
第19页 / 共35页
Advanced Find and Replace in Microsoft Word.docx_第20页
第20页 / 共35页
亲,该文档总共35页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

Advanced Find and Replace in Microsoft Word.docx

《Advanced Find and Replace in Microsoft Word.docx》由会员分享,可在线阅读,更多相关《Advanced Find and Replace in Microsoft Word.docx(35页珍藏版)》请在冰点文库上搜索。

Advanced Find and Replace in Microsoft Word.docx

AdvancedFindandReplaceinMicrosoftWord

AdvancedFindandReplaceinMicrosoftWord

JackM.Lyon

©2002bytheEditorium.Allrightsreserved.

Contents

Preface3

SearchingwithCodes4

MicrosoftWord’sBuilt-inCodes4

SearchingforSpecialCharacters5

ANSICharacterCodes6

What’sThatCharacter?

7

Replacingwith“FindWhatText”8

Example:

FormattingNoteNumbers8

UsingWildcards10

TheBasics10

WildcardCombinations11

WildcardRanges13

WildcardGrouping14

Usingthe“FindWhatExpression”Wildcard16

WildcardsintheRealWorld18

Example118

Example219

Example319

Two-StepSearching20

Step120

Step221

Reference22

Preface

Thisdocumentisacompilationofarticlesthatoriginallyappearedinmyemailnewsletter,EditoriumUpdate.MicrosoftWord’sadvancedsearchfeaturesareextremelypowerful,butthey’realsovirtuallyundocumented.Mostexplanationsoftheirusehavebeenlimitedtoasimpletableofvariouswildcards.Iwrotethesearticlestoremedythatsituation.

Asyoureadthesearticles,youmaywanttoactuallytrythetechniquesinMicrosoftWord,usingsomejunkdocumentsthatyounolongerneed.Doingsowillhelpyoulearnmorethanjustreadingtheinstructions.

IhopethesearticleswillhelpyouunderstandhowusefulWord’sadvancedsearchfeaturescanbeandhowmuchtimetheycansaveyou.Usingthesefeatures,youcanquicklyfixrepetitiveproblemsthatwouldtakehourstocorrectbyhand.

Enjoy!

SearchingwithCodes

Whyshouldyou,asaneditor,writer,orpublisher,careaboutsomethingas“technical”assearchingwithcodes?

Becausetheymakeitpossibletofindandreplacethingsyouordinarilycouldn’t,suchasparagraphbreaks,dashes,andsymbols.Thiscanbeabighelpincleaningupallkindsofeditorialandtypographicalproblemsthatyou’dotherwisehavetofixbyhand.

Thereareactuallytwodifferentkindsofcodes:

1.MicrosoftWord’sbuilt-incodes(suchas^pforparagraphbreaksand^tfortabs).

2.ANSIcharactercodes(suchas^013forparagraphbreaksand^009fortabs).

Bothkindsofcodesareuseful,butthelistofANSIcodesincludeseverycharacter(notincludingUnicodecharacters)youcanuseinMicrosoftWord.LaterI’llprovidealistofthesecodesandexplainhowtousethem.

MicrosoftWord’sBuilt-inCodes

First,I’llgiveyoualistofWord’sbuilt-incodes,whichyoucanuseinMicrosoftWord’sFindandReplacedialog(Edit/Replace).Forexample,ifyouwantedtofindanem dash,you’denterthefollowingcodeinthe“Findwhat”box:

^+

Toreplaceitwithanen dash,you’denterthisinthe“Replacewith”box:

^=

YoucanalsoinsertWord’sbuilt-incodesbyclickingtheSpecialbuttonintheFindandReplacedialogandthenselectingtheitemyouneed.Pleasenotethatyoucanusesomeofthecodesonlyinfindingtext,othersonlyinreplacing,andothersineitherone.

Youcanalsousecombinationsofcodes.Forexample,youcouldsearchfortabsfollowedbyparagraphbreaks(^t^p)andreplacethemwithparagraphbreaksalone(^p).

Andnow,here’sthelist.

Note

Foreasyreference,allthecodelistsarealsoincludedattheendofthisdocument.

CodesYouCanUseinthe

“FindWhat”and“ReplaceWith”Boxes

Character

Find

What

ReplaceWith

AnnotationMark(comment)

^a

Anycharacter

^?

Anydigit

^#

Anyletter

^$

Caretcharacter

^^

^^

Clipboardcontents

^c

Columnbreak

^n

^n

ContentsoftheFindWhatbox

^&

Emdash

^+

^+

Endash

^=

^=

Endnotemark

^e

Field

^d

Footnotemark

^f

Graphic

^g

Linebreak

^l

^l

Manualpagebreak

^m

^m

Nonbreakinghyphen

^~

^~

Nonbreakingspace

^s

^s

Optionalhyphen

^-

^-

Paragraphmark

^p

^p

Sectionbreak

^b

Tabcharacter

^t

^t

Whitespace

^w

SearchingforSpecialCharacters

AsIsaidabove,MicrosoftWordhasANSIcharactercodesyoucanusetofindcertainitemsthatarenotusuallyvisibleinthetext:

•Foracarriagereturn,youcanuse^013.

•Forasectionbreak,youcanuse^012.

•Forawordspace,youcanuse^032.

Ofcourse,youcanalsouseWord’sbuilt-incodesfromthetableabove,whichyoucaninsertintotheFinddialog’s“Findwhat”boxbyclickingthe“Special”button:

•Foracarriagereturn,youcanuse^p.

•Forasectionbreak,youcanuse^b.

•Forawordspace,youcanuse^w

(actually,anywhitespace).

Sowhywouldyouwanttousethefirstcodes?

Becauseifyou’refindingsomethingbyusingwildcards,thesecondoneswon’twork.Forexample,let’ssaythat(forsomereason)you’researchingfor“wh”followedbyanyothercharacter(thewildcardforwhichis“?

”),followedbyacarriagereturn.IntheFinddialog’s“Findwhat”box,youenterthis:

wh?

^p

AndtomakeWordsearchforthewildcardratherthananactualquestionmark,youputacheckintheboxlabeled“Usewildcards.”

Finally,youclicktheFindbutton.Whathappens?

Yougetanerrormessage:

^pisnotavalidspecialcharacterfortheFindWhatboxorisnotsupportedwhentheUseWildcardscheckboxisselected.

“Wellthen,how,”youpolitelyaskyourcomputer,“amIsupposedtofindwhatI’mlookingfor?

”Asusual,itdoesn’treply,buthere’stheansweranyway.Inthe“Findwhat”box,youenterthis:

wh?

^013

Andthatwilldothejob.(OnaPC.OnaMacintosh,usingnumericcodesmaynotworkwhenusingwildcards.Here’salittletrick,however.Tryenclosingthecodeinsquarebrackets,andprecedethecodewithabackslash.Forexample,tofindacarriagereturnonaMac,tryusing[\^013].)

Ordinarily,youshouldprobablyuseWord’sbuilt-incodes,suchas^pand^b.Butwhenthosedon’twork,nowyou’vegotanalternative.

ANSICharacterCodes

Youcanalsosearchforanycharactersusingnumericcharactercodes(technicallyANSInumbers).I’mincludingthelistattheendofthisdocument,withcodesforbothPCandMacintosh,althoughImakenoguaranteesabouthowthecharactersthemselveswillshowup.

Also,you’llnoticethatIhaven’tincludedthecodesforsuchordinarycharactersaslettersofthealphabet,sinceyoucansearchforthesebyusingthecharactersthemselves.Nocodeisneeded.

Tousethecodesforfindingorreplacingspecialcharacters,simplyinsertthem,precededbyacaretandazero,inthe“Findwhat”or“Replacewith”boxesinMicrosoftWord’sFindandReplacedialogbox.

Forexample,ifyouwantedtofindauwithanumlaut,you’denterthefollowingcodeinthe“Findwhat”boxonaPC:

^0252OnaMacintosh,you’denterthis:

^0159

Youcanalsousemanyofthecodestoinsertspecialcharactersintoyourdocuments.Todoso:

1.TurnonNumLockforthenumerickeypad.

2.HolddowntheALTkey.

3.Onthenumerickeypad,typeazerofollowedbythecode.

4.ReleasetheALTkey.

Thecharacterwillbeinsertedintoyourdocument.

WARNING:

Usenumericcodestoreplaceparagraphreturnsandsectionbreaksonlywhenabsolutelynecessary,becauseWordstoresformattinginformationinthesecharacters.TrytosticktoWord’sbuilt-incodeswhenyoucan.Also,beawarethatsomefontsassigndifferentcharacterstothenumericcodes.ThelistbelowshouldbeaccurateforTimesNewRomanonaPCandTimesonaMacintosh.

What’sThatCharacter?

Butwhatifyou’retryingtofindandreplacesomeobscurecharacterinanunusualfont?

Here'sthescenario:

Youopenagiantdocumentfromaclientandstartlookingthroughit.Butwhat'sthis?

Thesameoddcharacteratthebeginningofeveryparagraph.Mustbesomekindoffiletranslationerror.Odderstill,MicrosoftWordwon'tletyoupastethecharacterintoitsFindandReplacedialog,sohowareyougoingtogetridofthemall?

Byhand?

Horrors!

Ifyouknewthecharacter'snumericcode,youcouldsearchforit.Butthischaracterisn'tontheusuallist.Howcanyoufindoutitsnumericcode?

ByusingourtrustyNextCharactermacro:

ForMicrosoftWord6or7(95):

'Macrostartshere

NextChar$=Str$(Asc(Selection$()))

MsgBox"Thecodeforthenextcharacteris"\+NextChar$+".","NextCharacter"

'Macroendshere

ForMicrosoftWord8(97or98)

or9(2000or2001)

'Macrostartshere

DimNextChar$

NextChar$=Str(Asc(WordBasic.[Selection$]()))

WordBasic.MsgBox_"Thecodeforthenextcharacteris"+NextChar$+".",_"NextCharacter"

'Macroendshere

ToCreatetheMacro

1.Copytheappropriatemacrofromthisnewsletter.

2.Clickthe"Tools"menuatthetopofyourWordwindow.

3.Click"Macro."

4.InWord97,98,2000,or2001,click"Macros."

5.Makesure"MacrosAvailableIn"shows"Normal.dot."

6.Typeanameforthemacrointhe"MacroName"box--"NextCharacter"shoulddonicely.

7.Click"Create."

8.Pastethemacroatthecurrentinsertionpoint.

9.InWord6or7,click"File,"then"Close,"then"Yes."InWord97,98,2000,or2001,click"File,"then"CloseandReturntoMicrosoftWord."

ToRuntheMacro:

1.Putyourcursorinfrontofthecharacterwhosenumericcodeyouwanttoknow.

2.Clickthe"Tools"menuatthetopofyourWordwindow.

3.Click"Macro."

4.InWord97,98,2000,or2001,click"Macros."

5.Makesure"MacrosAvailableIn"shows"Normal.dot."

6.Selectthemacro(probably"NextCharacter")inthe"MacroName"box.

7.Click"Run."

Afteryourunthemacro,amessageboxwillappearonyourscreenwiththenumericcodeyouneed.

Replacingwith“FindWhatText”

Ifyou’refacedwithacomplextaskusingMicrosoftWord’sFindandReplacefeature,the“FindWhatText”replacementcodemaycomeinhandy.Forexample,let’ssayyouneedtoaddtheHTMLitalictagsandaroundanythingformattedwithitalic.(Ifyoudon’tunderstandHTML,don’tworry.You’llsoonseethepointofthisexample.)Youmightthinkyou’dneedamacrotoaddthetags,butyoudon’t.Youcaneasilyd

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 法律文书 > 调解书

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2