none
VBA Error 5322: Insufficient memory, the font cannot be displayed in Word RRS feed

  • Question

  • Hello everybody,

    As I got no answer at all on my German posting in https://social.technet.microsoft.com/Forums/en-US/3f3feda9-1eb3-48eb-9d9d-c2fe20a8485b/vba-fehler-5322-unzureichender-arbeitsspeicher-oder-nicht-gengend-speicherplatz-die-gewnschte?forum=office_14de, I repeat the issue here:

    A customer has a problem while running Office 2010 on Windows 10 which did not occur on Office 2010 running on Windows 7. Printing in a macro using the PrintOut() method yields the following error message (translated in my own words from German language):

    VBA Error 5322: Insufficient memory or not enough storage space. The requested font cannot be displayed by Word.

    The problem occurs if the document to be printed contains style templates which refer to a special font which was installed on the Windows 7 systems, but which shall no longer be installed on the Windows 10 systems. Please note that the problem does not occur if we run the PrintOut() method on a Windows 7 system without the font being installed. It only happens on Windows 10 (with the font not installed). Windows 7 seems to silently ignore the request and print perfectly, as the font is not really used in the document. There only exist (unused, as far as we can tell!) style sheets referring to the missing font.

    Can we teach Windows 10, or Word 2010 running on Windows 10, to ignore the nonexisting font and thus restore the Windows 7 behaviour? The alternative would only by running a macro over all of the (lots and loas) of documents. So, thanks for any tipp!


    Best Regards, Stefan Falk

    Wednesday, April 13, 2016 3:23 PM

Answers

  • Hello everybody,

    Yesterday, I have been with the customer and hopefully (to be full-scale tested yet) found a simple, but effective workaround for the problem: In the macro, there is some doc.PrintOut call (with doc being a reference to the open WinWord document). The problem seems to go away if we insert a DoEvents() call directly before the PrintOut() call. Funny enough, but initial testing showed no error message any more!

    I beg I will never have to look at the WinWord source code... ;-)


    Best Regards, Stefan Falk


    • Marked as answer by Stefan Falk Wednesday, April 27, 2016 12:37 PM
    • Edited by Stefan Falk Wednesday, April 27, 2016 12:37 PM
    Wednesday, April 27, 2016 12:37 PM

All replies

  • Hi,

    Please try copying the Normal.dotm template file from Windows 7 to Windows 10 to see if it helps. To do this, please follow:

    1. Go to Windows 10, close all Word instances.

    2. Go to the following location and delete the Normal.dotm template file.

    C:\Users\%username%\AppData\Roaming\Microsoft\Templates

    3. Now, go to Windows 7 and copy the Normal.dotm template file and paste it to the Windows 10 machine.

    4. Restart Word to see the result.

    Regards,

    Steve Fan
    TechNet Community Support


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com.
    Thursday, April 14, 2016 8:04 AM
    Moderator
  • Hello Steve,

    Thank you for your proposal. The customer will try, and we will report the results here.


    Best Regards, Stefan Falk

    Friday, April 15, 2016 9:36 AM
  • Hello Steve,

    Funny enough, most (but not all) documents open fine today, as the customer reports. Maybe there was an Office or Windows update last week handling this problem?

    For the documents which still did not open, the customer tried copying the normal templates. For at least 2 documents, that solved the problem. The customer will now test more documents.

    However, AutoText entries stored in the replaced normal templates are gone now, of course. In some Word version, the "Organize" command could not only transfer styles and macros from one document to another, but also AutoText. The "Organize" command in Word 2010 an up, however, offers only managing styles and macros, but not AutoText any more.

    So, how can we transfer AutoText entries from the replaced normal template to the new one, please?


    Best Regards, Stefan Falk

    Monday, April 18, 2016 10:05 AM
  • Hello Steve,

    Funny enough, most (but not all) documents open fine today, as the customer reports. Maybe there was an Office or Windows update last week handling this problem?

    For the documents which still did not open, the customer tried copying the normal templates. For at least 2 documents, that solved the problem. The customer will now test more documents.

    However, AutoText entries stored in the replaced normal templates are gone now, of course. In some Word version, the "Organize" command could not only transfer styles and macros from one document to another, but also AutoText. The "Organize" command in Word 2010 an up, however, offers only managing styles and macros, but not AutoText any more.

    So, how can we transfer AutoText entries from the replaced normal template to the new one, please?


    Best Regards, Stefan Falk

    Microsoft doesn't provide a method to transfer the AutoText entries. You may need to do it via some third-party tools or VBA codes.

    Regards,

    Steve Fan
    TechNet Community Support


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com.
    Friday, April 22, 2016 7:06 AM
    Moderator
  • Hello everybody,

    Yesterday, I have been with the customer and hopefully (to be full-scale tested yet) found a simple, but effective workaround for the problem: In the macro, there is some doc.PrintOut call (with doc being a reference to the open WinWord document). The problem seems to go away if we insert a DoEvents() call directly before the PrintOut() call. Funny enough, but initial testing showed no error message any more!

    I beg I will never have to look at the WinWord source code... ;-)


    Best Regards, Stefan Falk


    • Marked as answer by Stefan Falk Wednesday, April 27, 2016 12:37 PM
    • Edited by Stefan Falk Wednesday, April 27, 2016 12:37 PM
    Wednesday, April 27, 2016 12:37 PM
  • Thank you, Stefan Falk!!

    A client upgraded from Windows 7 to Windows 10, but kept Office 2010 and they started getting the same error on a Word macro. Adding DoEvents before PrintOut, solved it! 

    Saturday, July 27, 2019 10:59 AM
  • Hello Celia,

    great that the solution helped you also, and interesting that it seems a reproduceable problem! Good luck with your work.


    Best Regards, Stefan Falk

    Saturday, July 27, 2019 11:05 AM