I have a really weird problem with a word-plugin we lately deployed at our customer. The purpose is to let clients push their documents directly to our document storage (Filenet) via our server software that offers a web service interface. In order to do this the plugin will first gather some information using the web service, show a custom GUI where some meta data and a storage path can be selected and then finally converts the document to pdf and pushs it up.
This worked fine until the customer started to use templates that contained links to document objects (text blocks in other docx-files). While we first thought it might be a problem related to the document object of the Microsoft.Office.Interop.Word-Library we finally found out the first call to the web service hangs. Looks like some thread deadlock to me.
I started to remove code until all that was left was this piece of code attached to the button in our ribbon:
private void btnSaveDocumentToArchive_Click(object sender, RibbonControlEventArgs e)
{
var client = new BesServiceClient();
var besSearchProperties = client.getSearchableCriterias(new getSearchableCriterias
{
account = new account
{
login = "someLogin",
password = "aPassword",
language = "de",
dataStoreName = "dataStoreIdentifier"
}
});
}
So no interaction with the documentat all. But still I had the same behaviour: When and only when a document with linked objects is involved it hangs on the following line within the auto-generated "Reference.cs":
return base.Channel.getSearchableCriterias(request);
As I suspected this to be a threading problem (I still do) I tried to execute this piece of code in a newly created thread. Amazingly, our entire code executed as expected - not just this minimum code sample, but the entire productive code including GUI - but after the plugin code finishes, I have a freezed Word, which is in some way better than before, but still no solution for the customer. This also just happens when a document with linked objects is loaded.
The problem also just occurs if Word can reach the linked documents, when I moved these sources away everything worked. Interesting, but also no solution for the customer. I even tried to use rich text as sources, the problem remains.
OS: Vista 32bit/Windows 7 Ultimate 32bit
Word 2007 (12.0.668.5000)
.NET-Framework 4.0.30319
Every kind of input will be very much apreciated, thanks in advance.
Kind regards Roger