Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2020, 10:14 AM
Chopper Chopper is offline MS WORD search macro slows way down as it runs Windows 10 MS WORD search macro slows way down as it runs Office 2019
Novice
MS WORD search macro slows way down as it runs
 
Join Date: Dec 2020
Posts: 16
Chopper is on a distinguished road
Default


Greg:
Thanks for your reply. I'm not sure what you mean by "why ... looping" - perhaps the way I stated it is confusing. My macro simply moves through the Word doc one line/paragraph at a time (using Set pgphRange = ActiveDocument.Paragraphs(variable).Range), checks each line (contained in pgphRange) for certain text, processes (formats, outputs, saves) text if it meets certain requirements (or does nothing if the text does not meet those requirements), and goes to the next line/paragraph. [Upon reflection, I guess that does not really constitute "cycling" or "looping" - I apologize for being unclear].

Originally, I was incrementing "variable" (in the term above) to access the next line/paragraph, but that was what got me into trouble. Now I just replace "variable" with "1", and delete each line/paragraph as I finish with it. The whole thing is encased in a "Do ... Until no more lines/paragraphs" loop.

I can't post the code since the data is proprietary, and part of it would be exposed by the code.

Hope this clears things up.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
MS WORD search macro slows way down as it runs Bold Button Runs Macro DRD992 Word VBA 1 11-22-2017 02:23 PM
MS WORD search macro slows way down as it runs Word slows down as file size increases johnmill@dymeroaks.net Word 3 02-05-2016 05:49 PM
MS WORD search macro slows way down as it runs Word periodically slows / freezes when typing or printing KathyReid Word 3 09-26-2015 10:49 AM
MS WORD search macro slows way down as it runs Help:word editing slows down when copying a block diagram seeker_123 Word 1 03-02-2015 09:26 AM
MS WORD search macro slows way down as it runs Word slows to a crawl. traumatiziert Word 1 04-18-2012 12:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:20 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