![]() |
|
|
|
#1
|
|||
|
|||
|
I'm guessing is it is because the search string includes the paragraph mark and with a replace, everything defined is replaced so in the resulting vacuum Word just thinks the style should be the one following. Something like this could be used as a work around:
Code:
Sub ScratchMacro() 'A basic Word macro coded by Greg Maxey Dim oRng As Range Set oRng = ActiveDocument.Paragraphs(1).Range oRng.End = oRng.End - 1 oRng.Text = Replace(oRng.Text, ",", " ", 1, , vbTextCompare) lbl_Exit: Exit Sub End Sub |
|
| Tags |
| inheritance, style |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Inconsistent paragraph style | electricaltill | Word | 10 | 01-06-2016 10:09 AM |
Removing a paragraph style from the TOC
|
CTwriter | Word | 3 | 01-25-2013 12:38 AM |
| Paragraph Style for Thesis | groxby | Word | 1 | 03-24-2012 04:45 AM |
Style seems to inherit bold setting from previous style
|
Jennifer Murphy | Word | 3 | 02-16-2012 04:18 PM |
| Character style stripped while applying paragraph style | sams_gates | Word | 0 | 08-29-2009 02:03 AM |