473,800 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open MS Word 2003 document from VS2005- ASP.NET web page- Help nee

public WordApp()
{
//oWordAppl = new
Microsoft.Offic e.Interop.Word. ApplicationClas s();
}

When I click a button in my aspx file I geet the followign error. I am
trying to open word from server side (Word is also isntalled in windows2003
server)
Retrieving the COM class factory for component with CLSID
{000209FF-0000-0000-C000-000000000046} failed due to the following error:
80080005.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Runtime. InteropServices .COMException: Retrieving
the COM class factory for component with CLSID
{000209FF-0000-0000-C000-000000000046} failed due to the following error:
80080005.

Source Error:
Line 31: public WordApp()
Line 32: {
Line 33: oWordAppl = new Word.Applicatio nClass();
Line 34: //oWordAppl = new
Microsoft.Offic e.Interop.Word. ApplicationClas s();
Line 35: }
Source File: d:\inetpub\wwwr oot\PROBATION_N ET\App_Code\Wor dApp.cs Line: 33

Stack Trace:
[COMException (0x80080005): Retrieving the COM class factory for component
with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following
error: 80080005.]
WordApp..ctor() in d:\inetpub\wwwr oot\PROBATION_N ET\App_Code\Wor dApp.cs:33
DrugTest_DrugTe st.Button2_Clic k(Object sender, EventArgs e) in
d:\inetpub\wwwr oot\PROBATION_N ET\DrugTest\Dru gTest.aspx.cs:2 79
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +105
System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument)
+107

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +5102


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET
Version:2.0.507 27.42
Jan 14 '08 #1
1 4724
"Ravi" <Ra**@discussio ns.microsoft.co mwrote in message
news:0C******** *************** ***********@mic rosoft.com...
public WordApp()
{
//oWordAppl = new
Microsoft.Offic e.Interop.Word. ApplicationClas s();
}
Server-side instantiation of Office is extremely risky and unstable, and
neither recommended nor supported by Microsoft:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

Uninstall Word from your webserver and use this instead:
http://www.aspose.com/Products/Aspose.Words/
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jan 14 '08 #2

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

Similar topics

10
3063
by: Neil | last post by:
An article at http://news.com.com/2100-1012-991694.html?tag=fd_top states: "XML would allow easier interchange of data generated in Office documents with back-end systems or existing Web services." As part of an Access 2000 application, I have to continually parse Word documents and store the parsings in Access tables using Automation to control Word and parse the document. Is there a way that XML would help with that? Thanks.
8
9173
by: Asma | last post by:
Dear Sir, I am trying to find a way to open a Word document using C language and read the text of word doc into a variable. (Turbo C on Dos 6.0). Can anyone please tell me which libraries in C can be used to perform this task. Thanks you so much
8
3182
by: sudha | last post by:
Hi, To open a word doc from c#, i use the following code : Word.ApplicationClass WordApp = new Word.ApplicationClass (); // give any file name of your choice. object fileName = "C:\\test.doc"; object readOnly = false;
1
11578
by: webstuff | last post by:
Hi, I'm getting a 'Type mismatch' exception when calling the Word.Application.Documents.Open method when using the Office XP 2003 PIAs. the actual error is: System.Runtime.InteropServices.COMException (0x80020005): Type mismatch. This method works when using the Office XP PIAs (not that this fact is
6
2201
by: jimryder | last post by:
Hi, The following snippet: (ds is a populated dataset) string sXSLT = @"C:\XML\template\template.xsl"; string sTemp = @"C:\XML\temp\temp.xml"; string sOutput = @"C:\XML\output\output.xml"; ds.WriteXml(sTemp);
4
18643
by: Fabian | last post by:
Hello, I want to open a Word Document in my C# Programm. I tried this : Word.Application wordapp = new Word.Application(); object path = "TEST.DOC"; object vk_read_only = false; object vk_visible = true; object vk_false = false; object vk_true = true;
0
1142
by: jefftim | last post by:
Hi All I've saved a word document in sql server database.I'm able to retrieve it from the database and open it in a word application. My problem is I'm able to open it in server/client machines if the operating system is win2000 but not able to open in higher versions of windows(XP/2003). please try to solve my problem asap.
0
3233
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want to register new customer or companies they will enter the information in Windows Form and the program automaticaly creates the WORD document under specific folder under application path. Once the empty word file created than ask user if they want...
2
3051
by: jefftim | last post by:
Hi All I've saved a word document in sql server database.I'm able to retrieve it from the database and open it in a word application. My problem is I'm able to open it in server/client machines if the operating system is win2000 but when i'm opening it in windows(XP/2003) it is saying that document not found. please try to solve my problem asap.
0
2546
by: RKovach | last post by:
I am automating Word and getting the existing instance if available using the following: Word.Application oWord = null; Word.Document oDoc = null; object oMissing = System.Reflection.Missing.Value; object sFN = @"C:\Test\TestDoc.doc"; try {
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2948
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.