none
VSTO Add in for Word 2010 slow to open documents RRS feed

  • Question

  • Hi All

    I am working on a VSTO add in for word in which I open a document from SharePoint 2010 via a button on the ribbon, does anybody know why the following takes between 21 and 25 seconds to run?

    Globals.ThisAddIn.Application.Documents.Open(SharePointDocumentUrl)

    (Where SharePointDocumentUrl is a valid URL of a docx file in a SharePoint 2010 library and is already checked out to the current user)

    Opening the file by clicking on it in SharePoint take less than half this amount of time

    The add in has been developed in Visual Studio 2010 and uses .Net 3.5

    Any ideas on how to speed this up would be greatly appreciated

    Thanks

    Richard

    Wednesday, May 1, 2013 4:13 PM

Answers

  • Using fiddler I was able to find some web service calls that were running slowly and causing the problem. Some slight changes and its now much faster.

    Thanks for your efforts

    Thursday, May 23, 2013 2:32 PM

All replies

  • Hi 

    I find two helpful thread, I help those can help you :

    Word 2003 is opening networked documents very slowly

    Word Slow to Open Documents


    If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer. my sample

    Thursday, May 2, 2013 4:51 AM
  • if the add-in is installed using ClickOnce installer, by-default it checks everytime for the newer version when office is open. and then loads document.

    if addin is installed using msi or someother mechanism instead of clickonce, it will take leaser time, and will not find newer version.

    The following statement that u use to openup the document. might be taking time due to download, while when you open document directly from sharepoint you waits for download, and then when it opens up document it loads from local copy.

    In this add-in if you notify the user by using progressBar and let him know that it's downloading the file. then user will not mind to wait.

    Globals.ThisAddIn.Application.Documents.Open(SharePointDocumentUrl)


    Faisal Ahmed Farooqui —————————— If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Thursday, May 2, 2013 7:41 AM
  • Thanks for the help guys unfortunately these links did not provide an answer and I really need to speed up the process, a progress bar will not help.

    Do you have any other ideas?

    Richard

    Wednesday, May 8, 2013 10:17 AM
  • fire up fiddler, turn on displaying request times (time to last byte and timestamp if i recall correctly) and see if it actually takes so long due to client server cooomunication or if the problem is somewhere else.
    Wednesday, May 8, 2013 11:15 AM
  • Try to download the document at some temporary location from sharepoint, and then open it. It seems that this problem resides somewhere in this method. Globals.ThisAddIn.Application.Documents.Open(SharePointDocumentUrl)


    Faisal Ahmed Farooqui —————————— If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Wednesday, May 8, 2013 11:17 AM
  • Using fiddler I was able to find some web service calls that were running slowly and causing the problem. Some slight changes and its now much faster.

    Thanks for your efforts

    Thursday, May 23, 2013 2:32 PM