![]() |
#1
|
|||
|
|||
![]()
Help with debugging fairly simple (I hope) "selection.cut" error.
Ok, I 'wrote' these macros back in 2010... basically the system basically recorded my actions and saved into code. These have worked ever since and I've forgotten a lot... and I knew almost nothing to begin with! Anyways, one section is now erroring out. I've changed nothing, same Word I've been using for some time now, same code I've been using for well over a decade. I don't even remember what EXACTLY SPECIFICALLY these do anymore, just that they work for what I need. I've edited my post to hopefully just show the relevant section versus the entire code. Here's the sub-section I've having issues with. It's erroring out at 'selection.cut'. -------------------------------------------------- Selection.Find.Execute Selection.HomeKey Unit:=wdLine Selection.MoveUp Unit:=wdScreen, Count:=3, Extend:=wdExtend Selection.Cut Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^p^p^p" .Replacement.Text = "^p^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With -------------------------------------------------- Basically, this is just part of several macros I use to edit/fix e-Books so they display/view better. It's been a minute, but I think I'm copying everything ABOVE where any "Chapter One" begins, running all the steps, then pasting back in when completed. This worked for years, and now just stopped working. Sorry if I've made this more difficult than it should be. Calling me a novice at this would be a massive upgrade, I really know nothing. If you do know the fix, please treat me like a total moron and explain so I'd understand what to change. Greg Last edited by GDA63378; 08-03-2023 at 08:37 PM. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2003: VBA "Function" causes "#VALUE!" errors after running "insert/delete row" custom macro | Matt C | Excel Programming | 2 | 01-08-2022 06:03 AM |
"Word found unreadable content..." + "Word experienced an error trying to open..." | onas | Word | 1 | 09-02-2019 10:52 AM |
typing "scr" and problem with "extending selection" | danielmatt | Word | 16 | 07-21-2019 12:31 PM |
Error: "Changes made were lost...reconnect with server", when switching "from" field | randhurrle | Outlook | 2 | 02-25-2015 06:51 PM |
![]() |
NobodysPerfect | Word VBA | 3 | 01-14-2015 12:58 PM |