none
"Word cannot open the existing file (Normal.dotm)" when spawning multiple Word applications RRS feed

  • Question

  • I'm using multiple instances of winword.exe to process documents in parallel.

    Recently (no such behavior has occured over the last 1,5 years) I've encountered the following error: sometimes when starting an application instance, the error message "Word cannot open the existing file (Normal.dotm)" appears. After closing this message, the Normal.dotm template gets modified.

    The problem can be reproduced with a simple program

    using Microsoft.Office.Interop.Word;
    
    namespace MultipleWord
    {
        class Program
        {
            static void Main(string[] args)
            {
                while(true)
                {
                    Application app = new Application();
                    app.Visible = true;
                    System.Threading.Thread.Sleep(1000);
                }
            }
        }
    }

    So far I've tried:

    1) Deleting and replacing Normal.dotm
    2) Cleaning AppData and registry
    3) Removing and reinstalling Office

    Sadly, none of it helped. The error can only be reproduced on one machine, so it probably has to do with some specific Word settings. What settings can cause such behavior?

    Thanks for your help.

    Thursday, August 13, 2015 10:44 AM

Answers

  • Hi Stanislav

    If this is only the one machine then something has been "zapped" and you may not be able to correct it. For cases like this, the most "painless" (least amount of time/frustration) approach is to create a new user profile and migrate everything the user needs to it...


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, August 13, 2015 2:17 PM
    Moderator

All replies

  • Hi Stanislav

    If this is only the one machine then something has been "zapped" and you may not be able to correct it. For cases like this, the most "painless" (least amount of time/frustration) approach is to create a new user profile and migrate everything the user needs to it...


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, August 13, 2015 2:17 PM
    Moderator
  • Hi Stanislav,

    What’s the version of your Office?

    Base on my test with your code in word 2013, it works fine and it creates multiple processes (Task Manager).

    Why don’t you use app.Documents.Add method to open a new document?

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 14, 2015 6:55 AM
    Moderator
  • Hi Starain. I'm using Office 2013. This code works fine on one of my machines but has recently started throwing errors on another.

    I'm using multiple applications because each process needs to access some application-specific properties like selection and active window. Handling all documents in one application is a solution, but would require a lot of modifications.

    Friday, August 14, 2015 10:07 AM
  • Hi Cindy. I've tested it with a new user and the error is not reproduced. Thank you! Migrating to another account is not possible since I need to use a domain account, but I'll try to delete all user data and settings from the machine.
    Friday, August 14, 2015 10:23 AM