473,396 Members | 2,017 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,396 software developers and data experts.

read a word doc

i wrote a code to read a doc in asp.net i woked properly in my iis ms
word is installed in this pc. but when i published in another sever in
which there is no ms word instslled it give error in it i used com
reference.

i want to know is there is a way to read a doc when ms word is not
instslled on the server

Apr 10 '07 #1
5 4296
"sajithkahawatta" <sa*************@gmail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
>i wrote a code to read a doc in asp.net i woked properly in my iis ms
word is installed in this pc. but when i published in another sever in
which there is no ms word instslled it give error in it i used com
reference.

i want to know is there is a way to read a doc when ms word is not
instslled on the server
Firstly, you're in the wrong newsgroup. This is an ASP.NET question, and
should have been posted to microsoft.public.dotnet.framework.aspnet

Anyway...

Secondly, it's really important for you to understand that server-side
automation of Office is not supported at all by Microsoft, and is highly
unlikely to work in a networked environment:
http://support.microsoft.com/default...US;q257757#kb2

The fact that you may have got it working locally is neither here nor
there...

Thirdly, if you are simply wanting to stream a Word document to a client
browser, then it won't matter whether Word is installed on the server or
not, unless you're trying to do something else other than document
streaming.

Fourthly, your client machines will need to have a local copy of Word (or
the Word Viewer) installed otherwise they won't be able to view the document
natively.
Apr 10 '07 #2
actually i read a doc and get that data on to asp page to display on
webpage. so must ms word be installd to server

Apr 10 '07 #3
"sajithkahawatta" <sa*************@gmail.comwrote in message
news:11**********************@y5g2000hsa.googlegro ups.com...
actually i read a doc and get that data on to asp page to display on
webpage. so must ms word be installd to server
OK, I'll tell you again...

Server-side automation of Office is not supported at all by Microsoft, and
is highly unlikely to work in a networked environment:
http://support.microsoft.com/default...US;q257757#kb2

If you need to read a Word document server-side, then you need to use this:
http://www.aspose.com/Products/Aspose.Words/
Apr 10 '07 #4
"sajithkahawatta" <sa*************@gmail.comwrote in message
news:11**********************@y5g2000hsa.googlegro ups.com...
actually i read a doc and get that data on to asp page to display on
webpage. so must ms word be installd to server

As Marc said, the problem is with the way you "read" a word document. You don't actually
*read* the document from within your own code, you are "asking" a program "winword.exe" to
actually read the document, this is what is called automation, using another program as a
server, in order to perform a task the client (your code) can't actually execute himself.
This programming model isn't supported (and actually doesn't work) in a server like
environment like ASP and SP.NET, the "why" is carefully explained in the KB article pointed
to by Marc, please read it before getting to much involved into something that will probably
never work. Anyway, if you still want to go down that road, you'll need to install MS Word
on the server.

Willy.

Apr 10 '07 #5
"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
As Marc said, the problem is with the way you "read" a word document. You
don't actually *read* the document from within your own code, you are
"asking" a program "winword.exe" to actually read the document, this is
what is called automation, using another program as a server, in order to
perform a task the client (your code) can't actually execute himself. This
programming model isn't supported (and actually doesn't work) in a server
like environment like ASP and SP.NET, the "why" is carefully explained in
the KB article pointed to by Marc, please read it before getting to much
involved into something that will probably never work. Anyway, if you
still want to go down that road, you'll need to install MS Word on the
server.
Absolutely correct..

The problem I usually have in getting this over to people is that, whereas
(as you correctly state above) this almost always never works in a networked
production environment, it almost *always* works in a "standard"
single-developer environment i.e. VS.NET 2005, IIS 5.1, Office 2003 and IE
all installed and running locally on the same installation of XP Pro...

Therefore, developers stumble along quite happily with Office automation in
ASP.NET until the day they try to get it working over the network or, even
worse, over the Internet...

Reading the OP, I'm as certain as I can be that this is the case here...
Apr 10 '07 #6

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

Similar topics

4
by: gregus | last post by:
Hi everyone!!! I want to read data from several files into a single buffer. How can I do this??? I have something like this: //... typedef unsigned short word; const unsigned int W_SIZE =...
5
by: Shayer | last post by:
Hello All I am trying to read a MSDoc file and PDF file using Streamreader and then display the content into a richtext box. But cant do that. Anyone can pls help me out Thanks Shayer
3
by: sb Luis | last post by:
I Use the following code to read from MS Word, but I couldent read Formated Text (RTF). How Can I read formated text from MS Word Doc without using clipboard. thanks. Word.ApplicationClass...
2
by: Patrik Birgersson | last post by:
Hi there! I've been trying for days to find a solution anywhere on the web to this problem and I hope you might be able to sort me out. I want to use PHP and COM to set and read values of MS...
3
by: Jay | last post by:
Hi, I need to read word document file in ASP.net and place it in a text box . How to do it ? i tried : Word.Application app = new Word.ApplicationClass(); object nullobj =...
5
by: JohnSouth | last post by:
Hi I've seen lots of posts around this subject but nothing recent or very helpful. I've an ASP.Net c# application that needs to read Word documents from a directory on the web server, open...
6
by: arnuld | last post by:
This works fine, I welcome any views/advices/coding-practices :) /* C++ Primer - 4/e * * Exercise 8.9 * STATEMENT: * write a program to store each line from a file into a *...
0
by: alivip | last post by:
Is python provide search in parent folder contain sub folders and files for example folder name is cars and sub file is Toyota,Honda and BMW and Toyota contain file name camry and file name corola,...
11
by: alivip | last post by:
how to ingrate my code to read text in in parent folder contain sub folders and files for example folder name is cars and sub file is Toyota,Honda and BMW and Toyota contain file name Camry and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.