Results 1 to 13 of 13

Thread: Macros run slower and slower every time I run them.

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    6

    Macros run slower and slower every time I run them.

    I have a group of macros I use in Microsoft Word to edit old trial transcripts. (Look for thoy, and replace it with they and many other misspellings the OCR copied incorrectly from pdf to Word.)
    I just bought a new computer and have been having this problem: The first time I run the macros is fine, but the next time they run a little slower. Then, slower and slower every time I run them until they are running so slow, it doesn’t make sense to even use them. I can only run them about fifteen times. Rebooting is the only way I have been able to clear whatever is happening.
    My old computer did not do this; I’ve been running these macros for years. So, I don’t think it is a problem with the macros.
    Can anyone help me?

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    Re: Macros run slower and slower every time I run them.

    Moderator Actions: Moved Thread to Office Development
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: Macros run slower and slower every time I run them.

    What version of Office do you have installed on the new computer? Is it Office 365, or one of the perpetually licensed versions? What version of Windows is on the new computer?

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    6

    Re: Macros run slower and slower every time I run them.

    It was 364 originally. I thought that might be the problem so I loaded Office 2016 which is what I had on my old computer that ran everything fine.
    So right now I have Office 2016 and Windows 10.

  5. #5
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: Macros run slower and slower every time I run them.

    Did you uninstall Office 365 before installing Office 2016?

    What happens if you run the macro once, then close Word, re-open word, and run the macro again? Does it still run slower?

  6. #6

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    6

    Re: Macros run slower and slower every time I run them.

    Office 365 came on the new computer. When I saw that my macros didn't run properly I installed Office 2016.

    Running the macros, closing Word then re-opening Word doesn't fix it. The only thing that "re-sets" it is to reboot.

  7. #7
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: Macros run slower and slower every time I run them.

    After running the macro, then closing Word, run Task Manager. Check to see if an instance of Word is still running. Check also for any Office 365 instances. It is possible that not uninstalling Office 365 before installing Office 2016 could be the cause of the issue.

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    6

    Re: Macros run slower and slower every time I run them.

    I did as you suggested, [After running the macro, then closing Word, run Task Manager. Check to see if an instance of Word is still running.] There is no instance of Word or Office 365. I guess there could be some file there that is not obviously named that could belong to one of these programs, but nothing obvious.

  9. #9
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: Macros run slower and slower every time I run them.

    If your macros run fine on your old system, but slow down on the new one with the same version of Office installed, it might be tough to determine why that is happening. The test results have not shown any indication of issues. You could check Event Viewer to see if there are any indications of problems.

  10. #10

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    6

    Re: Macros run slower and slower every time I run them.

    Ok. Thank you very much for your help!

  11. #11
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: Macros run slower and slower every time I run them.

    You could post the code you are using here. Although unlikely, there might be something we could see that could cause an issue with Windows 10. Was your old system on Windows 10 also?

  12. #12

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    6

    Re: Macros run slower and slower every time I run them.

    Yes, it was Windows 10.

  13. #13
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Macros run slower and slower every time I run them.

    there was a fairly recent thread in this forum that had similar problems, may be worth looking back at that to see if they reached any solution there
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width