![]() |
|
|
|
#1
|
||||
|
||||
|
For 1:
Unless your footnotes have paragraphs that shouldn't terminate in a punctuation mark, you should be able to use - Find = ([!.\?\!])(^13) Replace = \1.\2 For 2: For empty footnote paragraphs, except where the footnote ends with an empty paragraph, you should be able to use - Find = (^13){2,} Replace = ^p Because you can't replace the final paragraph break in a footnote or endnote, there is a limit to what can be achieved via Find/Replace. A macro, however, could be used to iterate through each footnote and do the required processing.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Hi! I'm trying to accomplish #2 (replacing ^p^p with ^p in footnotes) but I'm at a loss because matches are found and clicking the "Find next" button does take me to the next occurrence, but replacing fails with no apparent error message.
I've tried both with and without wildcards, using either ^13^13 or ^p^p in the "Find" field, but to no avail. Also, writing it as VBA code gave no different result. As I found out here, the only thing that works is put my cursor at the start of the paragraph I want to delete and then press the Backspace key instead of the Delete key. But since my goal is coding all this, how does that translate to VBA? This post is supposed to solve it, but it hasn't worked for me and I don't understand why because I'm still pretty new to VBA coding. Thank you! Last edited by wido; 09-04-2019 at 07:47 AM. Reason: Added line before last. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Regular expressions for text with complex formatting
|
Kreol2013 | Word VBA | 1 | 04-12-2013 07:33 PM |
Regular Expressions: match words within quotes?
|
tinfanide | Word VBA | 3 | 02-02-2013 10:07 PM |
| regular expressions for empty lines | eNGiNe | Word | 1 | 01-21-2013 06:38 AM |
Regular expressions: lower case after hyphen
|
SusanG | Word | 2 | 06-06-2012 11:58 PM |
Regular Expressions: [!0-9] does not work???
|
tinfanide | Excel Programming | 4 | 05-30-2012 04:09 AM |