473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Help!! Problem instantiating WORD object using C#.NET

Hi experts,

I am trying to open the content of a WORD file from C#.NET which resides in
the REMOTE SERVER, however I get an error:
"System.Runtime.InteropServices.COMException: Server execution failed"
when declaring new Word.ApplicationClass().

string fileName = this.btnWorkOrder1.Value;
object readOnly = false;
object isVisible = false;
object saveChanges = false;
object missing = System.Reflection.Missing.Value;
object dynamic = 2;

//error here:
Word.ApplicationClass oWordApp = new Word.ApplicationClass();

Word.Document oWordDoc = oWordApp.Documents.Open(ref file, ref missing, ref
readOnly, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing,
ref missing, ref missing, ref isVisible);
Does anybody know how to solve it? Please help!!!

Thanks alot!!!
Handy Mulia

Jul 21 '05 #1
0 1080

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ronny Sigo | last post by:
Hello all, In my application I have to open a predefined MS Word document. I do this with the following code: Dim sDatum As String sDatum = Date Dim sNaamschrijver As String Dim appWord As...
1
by: Sakharam Phapale | last post by:
Hi All, I am working on Text editor. We are using Microsoft Word object for Spelling checking and correcting. Now I want to add new word in Word dictionary using Word object. Can anyone guide...
0
by: Balakrsihna | last post by:
Hi All, Can anyone tell me how to replace an image in MS Word 2003 using c#.net. I am converting an html file to word doc and sending this as attachment using System.Web.Mail; the...
1
by: Handy Mulia | last post by:
Hi experts, I am trying to open the content of a WORD file from C#.NET which resides in the REMOTE SERVER, however I get an error: "System.Runtime.InteropServices.COMException: Server execution...
3
by: Martin Austin | last post by:
Here's my problem. I'm launching an MS Word object on a Notes document Postopen event. The script kicks off a macro that saves the Word document to a temporary file every n minutes (backup of key...
1
by: Gomathi | last post by:
hi all, In my windows application, i added a word object reference. Using word object, i'm doing spell checking. After spell checking, i quited the word object. But still its running in task...
0
by: Ronald S. Cook | last post by:
I'm trying to open the Word object model, read some text and then close the document and app. But I get this when trying to close the document and application... Ambiguity between method...
0
by: Ronald S. Cook | last post by:
I'm trying to open the Word object model, read some text and then close the document and app. But I get this. Ambiguity between method 'Word._Document.Close(ref object, ref object, ref...
0
by: funeeldy | last post by:
I need to locate a particular table in a document. I cannot hardcode the table number since it could be different in every doc. I do have some header text that comes right before it consistently,...
0
by: Pramod Elig | last post by:
I developed this code which works fine in my current system which has office 2007, but when I run in word 2000 this doesn’t work. Can you please help me to code word automation using late binding. I...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.