![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I have a Word document with interviewer questions and answers
The format is like this: <Interviewer:><^t><One or more sentence(s) with closing punctuation><^p> and I want an MS Word Find and Replace macro to convert each instance into this: <bold><Interviewer:><space><Identical One or more sentence(s) with closing punctuation><^p></bold> The macro routine would look something like this: Sub Reformat_Tabbed_Para() ' Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting Selection.Find.Replacement.Font.Bold = True With Selection.Find .Text = <><><><> .Replacement.Text = "\1[space]\3\4" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll End Sub I believe there is code allowing me to find and replace the same string of characters and punctuation up to the ^p but cannot find the correct way of writing it. Help would be much appreciated! |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro for Find/replace to remove space before Hard Return | AlfredStreich | Word VBA | 4 | 01-23-2020 03:59 PM |
| Create a macro or Find/Replace Code to delete tags | bonzai217 | Word | 2 | 08-04-2019 08:36 AM |
Macro to find and replace headings in bold and underline
|
redzan | Word VBA | 4 | 02-13-2016 12:24 PM |
| Macro code that prompts user to enter text, then does find/replace. | sfvegas | PowerPoint | 0 | 01-10-2016 08:02 PM |
| Looking for code to create a macro that prompts user to enter text, then does a find/replace. | sfvegas | PowerPoint | 0 | 01-08-2016 02:22 AM |