473,608 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1183
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_auth or_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_autho r_plug>
----------------------------------------------

"Y.A." <an*******@disc ussions.microso ft.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="javas cript">
function f(){
var word = new ActiveXObject
("Word.Applicat ion");
word.Visible = true;
word.Documents. Add("Normal.dot ", false, 0);
var b = word.ActiveDocu ment.bookmarks
('NAME');
b.range.Text = 'O\'Neil';
}
</script>

<HTML>
<HEAD><TITLE>Te sting 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="javas cript">
function f(){
var word = new ActiveXObject
("Word.Applica tion");
word.Visible = true;
word.Documents. Add("Normal.dot ", false,

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

<HTML>
<HEAD><TITLE>T esting 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******@REMOVE THISFORNOSPAMho tmail.com

"John Timney (Microsoft MVP)" <ti*****@despam med.com> wrote in message
news:OS******** ******@TK2MSFTN GP10.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_auth or_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_autho r_plug>
----------------------------------------------

"Y.A." <an*******@disc ussions.microso ft.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
1642
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
1692
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 do if I want to perform a full-text search for these MSWord documents? or any alternative solution for me?? Thanks Best Regards, Eilsa
0
1268
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 = CreateObject("Word.Application") objWord.Visible = true objWord.Documents.Open strLocation
7
2055
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
2061
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# environment. I surfed the net and found some articles about interop ASP.Net with the MSWord. But I didn't find resource regarding using the MSWord as the ASP.Net C# report.
6
1820
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 the best way to do this? Is it good idea to have MSWord installed on the server? If it's not a good idea or if MSWord is not installed on the server what are the alternatives? I am using Office 2003. Thank You
7
3677
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 no experience about it i seen a exe file of vb6. which contain a msword file in this file some label & textbox control is placed i dont know how is it. and when i press commnd button which is in vb6 form. its data display i msword file Label...
0
1034
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 dotnet and vb code?
1
2588
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 asking if I would like to continue (Yes, No, Cancel). Is there a way to send the "Enter" or mouse click to this MSWord Dialog Box to invoke the "Yes" option, which will allow the MS Word to continue? I would appreciate any help... Matt
0
8059
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8000
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
8495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8470
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
8145
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
5475
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
3960
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
4023
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.