I can connect to the same computer from a Mac with Remote Desktop and performance is fine. I can connect to the same machine from a PC running Windows 7 and the performance is fine. I've used the Windows store version of Remote Desktop and I have the same problem.
I have created a macro that inserts a standard corporate classification that indicates that the information in the document is unclassified but is 'for official use only.' This is expressed as (U//FOUO) which appears before every body paragraph. I have also created a macro that inserts the same text expression before each level of numbered headings used the book. My book is a large (665 pages) Microsoft Word file.
It is also very 'dense' with many paragraphs, tables, and illustrations. Although my macros work successfully, they are very slow and take from about 6 to 10 minutes to complete. When the macros complete, a Runtime Error '28' (out of stack space) is displayed.
I don't know if the length of time is a result of inefficient coding on my part or a reflection of the density/complexity/length of the book. Could you suggest changes to the code below to make it run more efficiently? Or maybe just indicate whether the 'delays' might simply be a natural and expected result of the length of the document? My code is as follows: Public Sub InsertFOUObody 'Inserts U//FOUO before all body paragraphs Dim doc As Document Dim para As Paragraph Dim paraNext As Paragraph Dim MyText As String Set doc = ActiveDocument Set para = doc.Paragraphs.First Do While Not para Is Nothing Set paraNext = para.Next MyText = '(U//FOUO) ' If para.Style = doc.Styles(wdStyleBodyText) Then para.Range.InsertBefore (MyText) End If Set para = paraNext Loop End Sub When I try to debug the code, I get the impression that the offending line is Set paraNext = para.next. However, as a newbie to VBA I can't recognize why this line of code is at fault.
The code seems to be generating far more calls than necessary. The following code should be faster, because:. Do While was changed with For, this way you count the number of paragraphs once and you never return to the calculation. When you had Do While Not para Is Nothing, in every iteration you had to make sure if Not para Is Nothing. Less Set; no Set in the main part which is iterating. These statements add some time burden. You do not MyText = '(U//FOUO) ' in every iteration.
Instead, you state it once and forever at the beginning by making it a constant (constants are generally faster than usual strings). Public Sub InsertFOUObody2 'Inserts U//FOUO before all body paragraphs Const MyText As String = '(U//FOUO) ' Dim i As Long Dim doc As Document Set doc = ActiveDocument For i = 1 To doc.Paragraphs.Count With doc.Paragraphs(i) If.Style = doc.Styles(wdStyleBodyText) Then.Range.InsertBefore (MyText) End If End With Next End Sub.
Last updated: September 2018 Applicable for: Word 2019, 2016, 2013 and 2010; Windows 7 and 10 operating systems Here’s a question we got some time ago: Lately, i am noticing some slow down in my Microsoft Word 2016 software performance, this is visible mainly when starting up the software. My feeling is that some additional packages i have installed are causing this. Any ideas from your side? Microsoft Word’s performance is reasonable fast but it can definitely slow down if it’s bloated with add-on software or running on dated or inadequate hardware.
In this article, you’ll find some quick DIY tips to make Word work faster than ever before. Disable Word Add-ins Microsoft Office software has the capability to host Add-In components.
These small software programs extend the capabilities of the standard Office package to improve user productivity. In a way, you can think of those little programs as browser Add-ons, but just for Microsoft Office. The caveat is that sometimes, these Add-Ins slow Word, specially at startup, as the programs are loaded when Word is started causing a noticeable delay. This is probably the most common performance hiccup of Microsoft Office program, so it’s applicable also to Excel, PowerPoint, Access and Visio. If you notice that Word is slow as startup, you might want to look into your installed Add-Ins and temporarily disable the ones you don’t currently need.
Here’s how to accomplish that:. Open your Microsoft Word. Hit the ‘File’ button at the top right and choose ‘Options’ at the left side of the screen. Now, click on Add-Ins at the left side of the Windows called ‘ Word Options’.
Now, Choose ‘Go’ after selecting Manage ‘COM Add-Ins’ at the bottom of the same window. Uncheck the Add-Ins you don’t need in order to disable them (In my case, I’ve got just one COM Add-In to disable). Close Microsoft Word. Startup Word and see if you notice fast startup performance. If so, you might want to remove the disabled Add-Ins altogether, this will be covered in the next section. Remove unwanted Add-ins Similar to the previous tip, however, instead of un-checking the COM Add-Ins entries to disable proceed as following:.
Go ahead and highlight the entry to uninstall. Hit Remove. Repeat for all required entries. Once done hit OK. Consider an hardware upgrade Couple of readers contacted me reporting slow performance issues when working with large files which included pictures, which caused Word to get stuck. One of the solutions would be to upgrade your computer RAM memory to 8GB, specially if you run multiple programs in parallel or do some intensive work on image and video editing software. Always work on local documents Retrieving document and saving changes into files stored in remote locations (OneDrive, SharePoint libraries, shared folders etc’) is typically time consuming and depends on your network performance.
Therefore, If possible, ensure that the documents you are working are stored in your local drive. Once done, sync your changes into the network location or save a new version of your document so you can share with others contributors or reviewers. Note: If possible, also ensure that the local drive storing your documents is uncompressed. Disable Auto Correct options By default, Word checks your spelling and automatically correct any mistakes found in your text. Very useful feature, but has a performance penalty. To skip auto corrections, proceed as following:. Navigate to Options, then navigate to the Proofing tab.
Navigate to the lower section of the tab, and uncheck “Check spelling as you type” and “Mark grammar as you type”. Note: you’ll need to check your spelling and Grammar manually (Review tab Spelling and Grammar). Disable Screen Tips Screen Tips help you receive additional information and guidance when you hover on hyperlinks, comments and so forth. This is useful, but might impact Word performance. To cancel ScreenTips display in your Word document, proceed as following:.
Navigate to Options, then in the General tab, navigate to the UI options section. Then, under ScreenTips style, select Don’t Show ScreenTips. Clean Temporary/Unwanted Files: Quite often, cleaning up temporary/unwanted files can significantly improve your personal computer performance. Freeware solutions such as CCleaner and TreeSize Free can be specially helpful. Don’t forget to clean both your Temporary files and the Registry. You could also remove unwanted software that are installed in your system using the Add/Remove Programs panel.
Hopefully, these steps should make Word much faster. If you don’t notice anything different, leave us a comment below.