![]() |
#1
|
|||
|
|||
![]()
Hi fellas,
I'm very sorry to bother you again. I've spent quite a few hours trying to figure this out, but even the simple things are complicated when you're a complete novice. I've tried using the "Dim iCount As Integer" and adding various While/Wends and If/Elses etc in various parts of the macro with the message box at the end to tell me how many changes have been made but I can't get it to work. Here's a macro to delete the red footnote numbers (and a space after them) from the main text. I've also tried different kinds of execution such as "wdReplaceOne" and putting a simple execute on a loop, but I won't clutter things up by posting numerous failed codes here. I suspect "ReplaceAll" won't be compatible with a counter (but I could be wrong about that too). Could one of you alter this macro so that it counts the changes. Then I should be able to use that as a guide/template for any other macros. Thanks once again for your help, and I wouldn't be asking If I hadn't already put considerable effort into figuring it out myself. Sub DeleteFootnoteNumbers() Selection.Find.Font.Color = wdColorRed Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^2 " .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True Selection.Find.Execute Replace:=wdReplaceAll End With End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Marcia | Excel | 10 | 11-25-2018 08:41 PM |
![]() |
Jennifer Murphy | Word Tables | 1 | 08-23-2016 03:00 PM |
![]() |
sannhei | Word | 2 | 03-27-2015 05:40 AM |
Counting unique visitors by ward, counting monthly visits by status, editing existing workbook | JaxV | Excel | 9 | 11-14-2014 12:25 AM |
![]() |
bremen22 | Excel | 4 | 11-25-2013 11:57 AM |