VSTO for Office 64-bit - Delayed Load RRS feed

  • Question

  • Any ideas on what causes a delay inside Office Add-in.  Compiled C# 64-bit COM version for WORD2010, AnyCPU.

    Loaded these namespaces. Compiles perfectly.  Problem is when C# calls a large C# module there is 14 second delay

    with blue spinning wheel. Then Word proceeds normally. Second call, Word or Add-in has loaded something and no delay.

    using System;
    using System.Reflection;
    using System.Net.Configuration;
    using System.Collections;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Collections.Concurrent;
    using System.Runtime.InteropServices;
    using System.Runtime.Serialization;
    using System.Windows.Forms;
    using System.Linq;
    using System.Text;
    using System.Xml.Linq;
    using Word   = Microsoft.Office.Interop.Word;
    using Office = Microsoft.Office.Core;
    using Microsoft.Office.Tools.Word;
    using Microsoft.Office.Interop.Word;
    using Microsoft.Win32;
    using Microsoft.Office.Core;
    using System.Media;
    using System.IO;
    using System.Security.Permissions;

    Suspect Collections in ThisAddin class. Perhaps must be preloaded Array() class?

      public static readonly ReadOnlyCollection<string> people_jobs = new ReadOnlyCollection<string>(
             new string[] {

    Has any developer see this delay problem? Comments most welcome.

    Developers of Controlled English for translation.

    Saturday, August 15, 2015 1:54 AM

All replies

  • Hello,

    There can be various reasons why you see a delay...

    Take a look at the similar forum thread - Outlook freeze when loading an VSTO Addin, where performance issues are discussed with steps for investigating possible causes. Though it is related to Outlook add-ins, but the same steps can be applied to Word add-ins.

    Sunday, August 16, 2015 2:32 PM
  • Hi SmartTeam,

    >> Problem is when C# calls a large C# module there is 14 second delay<<

    I suggest that you remove the code in startup event to see whether this issue was caused by the specific code. If yes, you can comment the code one by one to see which line of code caused this issue.

    If not, can you reproduce this issue in a new project without custom code? 

    In addition, can you share more detail how we can reproduce this issue?

    Regards & Fei

    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.

    Tuesday, August 18, 2015 6:50 AM