Advertisement

05.25.2008 at 11:39AM PDT, ID: 23431484
[x]
Attachment Details

Using Microsoft.Interop.Office.Word (v12) hangs when running on a server

Asked by ColoradoMike in Microsoft Visual C#.Net, .Net Editors & IDEs

Tags: C# - ASP.NET

I've build a DLL that is hooked to a Queue in MSMQ.  When a queue message arrives, the code invokes Word 2007 to convert a document to PDF.

When I run the code on my local machine, it runs fine, but when I run it from a server, Word starts but the code stops at that point.

Any suggestions on why this hangs on the server?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
...
using Microsoft.Office.Interop.Word;
 
public class PDFConverter
    {
        public void ProcessMessage(object MsgBody)
        { 
        // Other stuff
        ApplicationClass wordApplication = new ApplicationClass();
            wordApplication.Visible = false;
            Document wordDocument = null;
        
        // More stuff I've omitted
 
        wordDocument = wordApplication.Documents.Open(ref completeFilePath, ref paramMissing, ref paramMissing,
ref paramMissing, ref paramMissing, ref paramMissing,
ref paramMissing, ref paramMissing, ref paramMissing,
ref paramMissing, ref paramMissing, ref paramMissing,
ref paramMissing, ref paramMissing, ref paramMissing,
ref paramMissing);
 
}
[+][-]05.25.2008 at 12:36PM PDT, ID: 21643494

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.26.2008 at 08:31PM PDT, ID: 21649199

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, .Net Editors & IDEs
Tags: C# - ASP.NET
Sign Up Now!
Solution Provided By: ColoradoMike
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628