Open A Word File?
Apr 14, 2010I have a MS Word document saved in the web server and I want to open it without MS Office Interop, from my web page.
What is the best possible way to achieve it?
I have a MS Word document saved in the web server and I want to open it without MS Office Interop, from my web page.
What is the best possible way to achieve it?
My requirement is : I have to open a word document in Microsoft word from my web application and the word document is stored in the server location.
In javascript i wrote a code to open the word document like below.
var dsWordApp = new ActiveXObject("Word.Application");
var WordDoc = dsWordApp.Documents.Open(FileName)
Using above script i am able to open the local word doc files but i am unable to open the server side word doc file.
how to open a server side word doc fie in MSword.
I am using below code to generate word document using assp.net/c#.net, please tell me where i am missing it is generating word file and all contents are their.but problem is that when i open it it gives me error:"The Office Open XML file filename.doc cannot be opened because there are problems with the contents"
and after clicking ok i get my required file.remove this error.
in error details:The file is corrupt and cannot be opened after it again gets a error message:"word found unreadable content in myfile.do you want to recover the contents of this document? if you trust the source of ths document,click yes"
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office;
[code]...
My world file is place on server . how i will open it through click event. is there any way to open in html or i wil call word application.
i tried javascript, importing com library but faild'
at java script while i create activex object exception arise.
how to open word files in asp.net
i use ms office 2007
I open a mht file with the streamreader and I do some handling with the file.
Then I would like te open this content with word (200,2003,2007).
What's the correct content type to use for the Response.WriteFile method ?
As normally a mht file has content type multipart/related ...
The code i use is:
[Code]....
i have an aspx page with one button on it the name of the page is Default.aspx
i have a physical microsoft office word file in the c drive
what i want to do is that when i press a button i open a microsoft office word located on the c drive then i add some text to it using c# code
then i want to open the file (that i edited and located in memory) in mircosoft office word to see the text that i have added
everything works fine but when i press the button i get a prompt that says do you want to open the file or save it .
questions:
so how can i directly open the file (located in memory) in microsoft office word without this prompt
also if i choose open from the prompt the file opens in the read only mode and the title of the file in the microsoft word become the name of the aspx page which is Default.aspx
so what is going wrong here
[Code]....
I have a word document which opens in a web browser using ASP.NET 2.0 this is the code:
[Code]....
THIS WORKS, PROMPTING THE USER WITH "OPEN" "SAVE" "CANCEL" OR SOME USERS WITH "SAVE" "CANCEL" DEPENDING ON USER INTERNET SECURITY SETTING. BUT FOR SECURITY ISSUES, MY BOSS WANT THIS WORD DOCUMENT TO BE OPENED IN WORD PROGRAM. (MICROSOFT WORD 93,97 ETC) IS THIS POSSIBLE....? OFCOURSE SAVING THE FILE IS OKAY, JUST OPENING THE DOCUMENT SHOULD BE NOT BROWSER.
In my application users upload their word document and user has been given an option to preivew the uploaded document. Inorder to preview the document i put the following code in my page_load event
div1.InnerHtml = "<iframe name='iframe4' src='DocumentUuploaded/report.doc ' target='iframe4' frameborder='no' height='500' scrolling='no' width='800'></iframe>";
The problem is it is asking Do you want to open or save this file. How can i get rid of this dialouge box
I want to open word file in internal window without Dialog box.I use below code.Its is working fine on local machine but when i upload this code on ftp server its is not working and giving me error of Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
[code]....
in my application, when user click on particular link button, MS word has to open how can i write the code for this.
View 3 RepliesI have a problem which I have not been able to find an answer to in months. I store word doc resumes as varbinary(max). I can retrieve the resumes based on a full-text search - no problem. But the resumes are retrieved as word documents in a .ashx file with the following code. I really need to implement hit highlighting on the site so that users can see if the returned resume is a good fit or not. I don't think this can be done from an .ashx file, so I think I need to be able to open the resume as html in an aspx page and maybe use javascript to do the hit highlighting or perhaps return the text only content of the word document somehow and manipulate the text before display with html tags. I cant find anything anywhere which addresses the problem.
[code]....
How to open Pdf,word and CHM on web broswer ?
View 4 RepliesI open Microsoft Word through ASP.NET , when I load by visual studio 2008 works well.but when I put my site in my IIS folder and access the site through Internet Explorer and click the button nothing happens.Don't happen anything. Why my code :
wdApp =
New
Microsoft.Office.Interop.Word.Application
When i try to open a csv file from my asp.net 3.5 app by clicking on the link provided, a file download dialog box appears.When i click on the open button from there , i get this eror
C:Documents and settingsUserNameLocal SettingsTemporary Internet FilesContent.IE5X9TXTM06myfilename.csv could not be found .Check the spelling of the file name and verify that the file locationis correct?
Wjy am i getting this error? I am trying to open a file and it complains about file not found in the Temporary Internet Folder.I tried deleting the temp intrnet files.Dint work.I have IE 7 on xp professional sp3. Also i am streaming the file from the application. This happens only to some files and the rest of the files , i can open .
I was playing with some files the other day and one of them was a word document. That then got me thinking whether it was possible to open thos files in my browser. Saves Opening/Saving everytime i click on a document.
View 1 RepliesI want to get a word document from data base by ASP.Net and show it on Internet Explorer, then I want to edit some text and replace this document with the original one, exactly same as Sharepoint. I couldn't find any tutorial or example for this situation.
View 1 RepliesI need to be able to click on a button and have it open a word document help file that is stored on the LAN (e.g. \serverfilepath.doc). The word doc can be opened in Word or in the browser, which ever is easier. What's the easiest way to do this?Opening a PDF is even easier, I'm open to that option as well. I'm running Visual Studio 2008 with VB codebehind.
View 3 RepliesI'm trying to open Word & Excel docs in a new browser window. The windows opens and then closes straight away. I think I may need browser plugins. Can someone provide some advice on how I can achieve this?
Here's my code:
From calling page:
[Code]....
From new page:
[Code]....
What i need to do is to retrieve only one page of word document at a time and provide user with next and previous buttons to move to forward and backwards to view other pages of document, just like pagging in gird view of other controls.
View 2 Repliesi have an link button in my gridview once user click that link button i need to open an a word document(the path where the document is stored in server would be like this c:/abc/doc/abc1.doc) so now i should all ow the user to download that document for viewing it.
View 2 RepliesI have an word document that's get opend by an web application and some handling is processed.
On my local iis serer this works but not on the real web server.
I installed word 2007 on the web server and set impersonation to true in the web config.
The code I use:
[Code]....
I wrote an web form application in C# to open Office Word 2007 documents from the application. This worked perfectly testing in my development environment. But after deploying my application to web server, the documents do not open and I get the following error retrieving the com class factory for component with clsid failed due to the following error: 80040154
It looks like it may be because Office Word 2007 is not installed on the web server box. Would installing it on the web server be the solution, or is this a bad idea. If it is not the solution, then would is an alternative way to do this.
How to create and open a docx in client side's Word from asp.net application? and if i want the user to customize the document at their localend, then how can i do this?
View 1 RepliesI am pulling word documents that have been stored in our db as blobs and presenting them to the user. As you can see below, I am writing to the http stream via BinaryWrite. This is causing the Microsoft Word application to open in a separate window. My goal was to open the word document inside of the browser instead. Preferably inside of an iframe within the browser. Is there a way to target an iframe by some analog of the method below?
[Code]....
How to open word document 2007 and save formate as .xps at server side.
I want the user to open word docx at server side user will click the button to open document which will be execute at server side. I want to show to my client a xps formate of docx which will be converted at server side(from .docx to .xps).
My code is running on local correctly. but at iis5.1 it's not working & giving an exception :-
System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
[Code]....