Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-03-2023, 03:24 PM
GDA63378 GDA63378 is offline Help with debugging fairly simple "selection.cut" error. Windows 10 Help with debugging fairly simple "selection.cut" error. Office 2019
Novice
Help with debugging fairly simple "selection.cut" error.
 
Join Date: Aug 2023
Posts: 4
GDA63378 is on a distinguished road
Default Help with debugging fairly simple "selection.cut" error.

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.
Reply With Quote
 



Similar Threads
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
Help with debugging fairly simple "selection.cut" error. Selection.Bookmarks("\headinglevel") WITHOUT Selection NobodysPerfect Word VBA 3 01-14-2015 12:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft