none
What is broken in Word 2013 VBA?

    Question

  • I've seen some questions about Word 2010 VBA processes running "annoyingly" slow compared to the same processes in Word 2003.  However, I haven't seen any significant discussion or reasons why Word 2013 VBA processes are "painfully" if not unacceptably slower than the same processes in Word 2010.

    What have the Word developers at Microsoft done to cause this issue?  I seem to recall one brief discussing during beta testing that the issue code be due to some hidden debugging script going on in the background that hopefully will be removed before RTM.  Is this the case?  Will this issue ever be resolved? 

    For an example, I just recently complete an add-in for indexing and counting words in a document.  By its very nature, the process can take considerable time in long documents even in Word2003.  That transposes to an considerable and annoyingly long time in Word 2010 to "painfully" and downright ridiculous in Word 2013.  http://gregmaxey.mvps.org/word_tip_pages/word_usage_and_frequency_report.html

     

     

    Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htm

    Sunday, February 24, 2013 3:30 PM

All replies

  • Good job, the addin is quite useful.


    with regards, Yuri

    Monday, February 25, 2013 6:49 AM
  • Hi Greg,

    Thank you for posting in the MSDN Forum.

    I'll involve some experts into this issue. This may take some time.

    Thank you for your patience and understanding.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 25, 2013 7:44 AM
    Moderator
  • Yuri, Quist,

    Thanks for your replies and comments.

    I have made a major efficiency enhancement to the add-in by employing a For ... Each loop vice indexing a counter and setting the object to the index.  Yuri the new add-ins are published:  http://gregmaxey.mvps.org/word_tip_pages/word_usage_and_frequency_report.html

    Quist, there is still something not right with processes like:
    Dim i as Long
    Dim x

    For i = 1 to 100000
      Set x = Whatever(i)
    Next i

    in both Word 2010 and Word2013 as compared to Word2003.


    Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htm

    Monday, February 25, 2013 11:55 PM
  • Are you using the streaming version of Word 2013? I have the streamed Word 2013 preview and it was very slow to start with running VBA code. I once timed it at 30 seconds compared to 3 seconds in Word 97.

    I find it a lot better now. I think I once read it downloads more features locally the more you use the streaming version. But I imagine you need a proper local install of Word 2013 for speed (as discussed at http://social.technet.microsoft.com/Forums/en-US/officeitpropreview/thread/5c94c06f-d6ca-4447-8b41-d9bd52ad3e65/)

    PS I find VBA on Word 97 to be unbeatably fast when doing stuff with Range/Selection. In contrast, doing the same thing using .NET on Word 2007 is a lot slower. So much for progess!

    Sunday, March 03, 2013 3:20 PM
  • I have a local install.  After making the code changes noted above both Word 2013 and Word 2010 are performing about the same.  They are still slower than Word 2003 though.  I've not had acess woth Word 97 in quite some time and didn't use it with VBA when I did.  Thanks.

    Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htm

    Monday, March 04, 2013 12:02 AM
  • I have been testing my VBA application with Word 2013, and find that its performance is severely degraded compared to Word 2010 and earlier versions (for example, one of the functional tests takes between 5 and 8 times longer to run in 2013 than in 2010).

    Google searches reveal I am not alone - indeed, that is how I came across this thread. Some of the most interesting results I have come across were using the search 'Description of the Office updates site:microsoft.com’. It reveals a number of monthly updates, many of which give an unspecified promise:  ‘Additionally, this update contains stability and performance improvements’.

    There are too many of these fixes to make applying and testing them individually a realistic task. As Microsoft seem to be aware of performance issues, I wonder if they might be able to say whether a performance-related Service Pack or other fix package might be in the offing, and if so when it might be expected.

    As Quist Zhang stated on February 25 - 5 weeks ago - that he was involving some experts in this issue, I hope MS will by now be able at least to give us some idea of progress.

    Sunday, March 31, 2013 10:44 AM
  • Hello,

    I was able to see that the code is slower in Word 2010 and 2013 than it is in 2003.

    All debugging script should be removed from the final released builds so that should not be an issue.

    I am glad to hear you were able to enhance the add-in to improve the efficiency.

    Any Service Pack or other updates for Office are cumulative.  If this is fixed by any updates, you should be able to obtain that fix by getting the latest update - you would not need to check each one individually.

    To really determine why this is happening would require a more in-depth level of support and that falls into the paid support category.  Of course, if this is determined to be a problem in Word VBA and a bug is confirmed, you would not have to pay for the support incident.  There have been some support incidents create for performance issues and some are still under review.  At this time I cannot determine if those are directly related to the code provided in this posting.  If you have the latest updates but are still seeing performance issues and would like to have those reviewed in-depth please visit the below link to see the various paid support options that are available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone


    Thank you, Matt B. Microsoft Online Community Support

    Sunday, April 21, 2013 9:18 PM
  • Any Service Pack or other updates for Office are cumulative.  If this is fixed by any updates, you should be able to obtain that fix by getting the latest update - you would not need to check each one individually.

    Does this definitely apply to the Monthly Updates I mentioned? That doesn't seem to tally with the text in each one, which describes the fixes it contains. 

    For example, http://support.microsoft.com/kb/2833132 (Description of the Office updates: April 9, 2013) mentions several other KB articles, each of which addresses a limited set of issues and has a separate set of files for download:

    The main http://support.microsoft.com/kb/2833132 does not have a link to download all the April updates, let alone all updates to date.

    Monday, April 22, 2013 11:50 AM
  • Quist,

    It is now three months since you said 'I'll involve some experts into this issue. This may take some time.'. Any idea how much more time before some progress might be made?

    Monday, May 27, 2013 8:21 AM
  • Hi Julian,

    Since the issue is beyond the scope of this forum, Matt has already suggested Greg to open a support case.

    Sorry for the inconvenience that occurs to you.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 27, 2013 9:29 AM
    Moderator
  • Greg has no intention of paying for Microsoft to investigate and resolve degraded performance in its premier Office applications.  Many VBA procedures run faster in Word 2003 than they do in later versions.  I can live with it and I'm not going to pay to find out why. 

    Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htm

    Monday, May 27, 2013 5:42 PM
  • I raised a support case myself some weeks ago. Its current status can be summarised thus:

    1. Microsoft have acknowledged shortcomings in the performance of Word 2013, and will therefore not change me for the case;
    2. The support engineer has reported the problem to the development team, but has no way of knowing what (if anything) they are doing to fix it. 

    Unlike Greg, I am concerned that the problem is fixed. That is why, having had no joy from the Support Case route, I returned to this forum yesterday.

    Tuesday, May 28, 2013 8:50 AM
  • I first tested our code in Word 2013 in December 2012.  I made a note at the time that it was running about 5 times slower than the same code in 2010. 

    I returned to test 2013 again today and, with Word version 15.0.4481.1508, our code is running about 3 times slower than the same code in Word 2010.

    I then wrote a very simple VBA macro that thrashes around in a document using some Range and Paragraph objects and that takes just over twice as long to run in Word 2013 as it does in Word 2010.

    On that basis, I'd say that the Word 2013 object model is probably still running 2-3 times slower than it was in Word 2010 - although I'm sure it depends on what you do.

    I suppose everyone (including Microsoft) has an interest in this problem being resolved. I'm surprised it's not getting more attention.


    • Edited by Derek Neve Sunday, June 02, 2013 9:02 AM
    Sunday, June 02, 2013 8:55 AM