473,382 Members | 1,583 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,382 software developers and data experts.

MsWord With Asp.Net on theserver

I want to start msWord on the server with an a givene file
(.doc), customize the file (update it) then display it on
the client machine -- all this on intranet using asp.net.
I know it's doable with some javascript using ActiveX --
is anyone aware for another way to do it
Nov 18 '05 #1
5 1173
How do you do it with javascript?
-----Original Message-----
I want to start msWord on the server with an a givene file(.doc), customize the file (update it) then display it onthe client machine -- all this on intranet using asp.net.
I know it's doable with some javascript using ActiveX --
is anyone aware for another way to do it
.

Nov 18 '05 #2
MSWord is not really a server side tool, and you can easily hang your server
by leaving too many instances open. That said, someone has kindly provided
an excellent tuorial on doing it....

http://www.codeproject.com/aspnet/wordapplication.asp

A better approach might be to create RTF files or HTML files, which are just
text really, and pass them with a .DOC extension. Word is clever enough to
usually open them in the correct way and convert them for you at the client
side - of course you will need to test this.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Y.A." <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
I want to start msWord on the server with an a givene file
(.doc), customize the file (update it) then display it on
the client machine -- all this on intranet using asp.net.
I know it's doable with some javascript using ActiveX --
is anyone aware for another way to do it

Nov 18 '05 #3
-----Original Message-----
How do you do it with javascript?
-----Original Message-----
I want to start msWord on the server with an a givenefile
(.doc), customize the file (update it) then display it

on
the client machine -- all this on intranet using asp.net.
I know it's doable with some javascript using ActiveX --
is anyone aware for another way to do it
.

<script language="javascript">
function f(){
var word = new ActiveXObject
("Word.Application");
word.Visible = true;
word.Documents.Add("Normal.dot", false, 0);
var b = word.ActiveDocument.bookmarks
('NAME');
b.range.Text = 'O\'Neil';
}
</script>

<HTML>
<HEAD><TITLE>Testing Word from HTML</Title></HEAD>
<BODY OnLoad='f()'>
</BODY>
</HTML>

You may as well function using Ranges.
Nov 18 '05 #4
Thanks.
-----Original Message-----
-----Original Message-----
How do you do it with javascript?
-----Original Message-----
I want to start msWord on the server with an a givenefile
(.doc), customize the file (update it) then display it

on
the client machine -- all this on intranet using asp.net.I know it's doable with some javascript using ActiveX - -is anyone aware for another way to do it
.

<script language="javascript">
function f(){
var word = new ActiveXObject
("Word.Application");
word.Visible = true;
word.Documents.Add("Normal.dot", false,

0); var b = word.ActiveDocument.bookmarks
('NAME');
b.range.Text = 'O\'Neil';
}
</script>

<HTML>
<HEAD><TITLE>Testing Word from HTML</Title></HEAD>
<BODY OnLoad='f()'>
</BODY>
</HTML>

You may as well function using Ranges.
.

Nov 18 '05 #5
A better way to create WordML based documents serverside. You can create the
Word document using an XML based formatting, which is easy to manipulate
using the XML interfaces.

A small introduction is posted at:
http://msdn.microsoft.com/msdnmag/is...s/default.aspx

Naturally you have to keep in focus which Word version you are supporting.
The 2k3 versions are obvious the more enhanced versions, but previous
versions do have a xml document definition available.

For this older version (Office2k) have a look at this download:
http://forums.devshed.com/attachment...&postid=305567

The message is: Do not start Word at the server!

-= Maarten van Stam =-
aa******@REMOVETHISFORNOSPAMhotmail.com

"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:OS**************@TK2MSFTNGP10.phx.gbl...
MSWord is not really a server side tool, and you can easily hang your server by leaving too many instances open. That said, someone has kindly provided an excellent tuorial on doing it....

http://www.codeproject.com/aspnet/wordapplication.asp

A better approach might be to create RTF files or HTML files, which are just text really, and pass them with a .DOC extension. Word is clever enough to usually open them in the correct way and convert them for you at the client side - of course you will need to test this.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Y.A." <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
I want to start msWord on the server with an a givene file
(.doc), customize the file (update it) then display it on
the client machine -- all this on intranet using asp.net.
I know it's doable with some javascript using ActiveX --
is anyone aware for another way to do it


Nov 18 '05 #6

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

Similar topics

0
by: Tom Gao | last post by:
hi guys I'm trying to export an aspx page to msword. ############# I know you can do Response.Clear(); Response.ContentType="application/msword";
1
by: Eilsa | last post by:
I want to perform a full-text search for a lot of MSWord documents. So that I have to read the MSWord content and store it to the database. However, I cannot find any solution on it. What should I...
0
by: staleb | last post by:
Hi I want to open a MSWord document on the clients PC/MSWord, the solution I use now is this: <script language=vbscript runat=Server> <!-- sub OpenDoc(strLocation) set objWord =...
7
by: lkr | last post by:
hi is there is anyway to capture the document events of a MSWord?eg:I have to handle the event awhen WM_KEYUP or anyother events will occur. give me a solution............ thanks in advance lkr
1
by: Jason Huang | last post by:
Hi, I have no problem in creating or modifying a word document in ASP.Net, using C#. However, I don't know how to export database in SQL 2000 or MSAccess to MSWord, given in the ASP.Net and C#...
6
by: Peter | last post by:
I have to write a ASP.NET application that creates MSWord document from a template and populated with data from the webpage. (Templates can reside on the server or client's hard drive.) What is...
7
by: rinku123 | last post by:
suppose in vb form are more then one textbox which is contain data and i want i click command button it save in msword file and it can replace many times suppose just like we make report). i have...
0
by: arkark | last post by:
Hi I Need Very Urgent In My Project I access the msword, in Msword header section just i insert the text only. I unable to insert the images.how can i insert the image in msword header using asp...
1
by: Matt Curreri | last post by:
I'm trying to automate the creation of a MSWord document with C#; however, when I start creating the MSWord document, I occassionly have a MSWord dialog box displaying a warning of low memory and...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.