473,606 Members | 2,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net and microsoft word

is it possible to open / create word documents in word ?
eg open a document and replace text and print ? using asp and vb behind.
if so is there any tutorials anywhere ? (heh difficult searching using
google for asp / word.... !)

mark
Nov 18 '05 #1
3 1364

"mark" <ma**@remove.co m> wrote in message news:OYktc.53$y c4.2@newsfe5-win...
is it possible to open / create word documents in word ?
eg open a document and replace text and print ? using asp and vb behind.
if so is there any tutorials anywhere ? (heh difficult searching using
google for asp / word.... !)

mark


It *is* possible to access Word from an application (sorry, I have
no examples), but (when you are using asp.net) the printing will take
place on the server, not on the client!

Hans Kesting
Nov 18 '05 #2

"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..

"mark" <ma**@remove.co m> wrote in message

news:OYktc.53$y c4.2@newsfe5-win...
is it possible to open / create word documents in word ?
eg open a document and replace text and print ? using asp and vb behind.
if so is there any tutorials anywhere ? (heh difficult searching using
google for asp / word.... !)

mark


It *is* possible to access Word from an application (sorry, I have
no examples), but (when you are using asp.net) the printing will take
place on the server, not on the client!

Hans Kesting

that wouldnt be too much of a problem, printers are networked, plus all the
documents are stored on the same server,

Nov 18 '05 #3
> is it possible to open / create word documents in word ?
eg open a document and replace text and print ? using asp and vb behind.
if so is there any tutorials anywhere ? (heh difficult searching using
google for asp / word.... !)


Yes, this is theory possible. You can do things like this:

Dim WordApp As New Word.Applicatio n
Dim WordDoc As Word.Document
Set WordDoc = WordApp.Open FileName
....do find the replace...
WordDoc.Save

This is from the top of my head and the syntax/objects are probably wrong.
The Word object model is documented in MSDN.

That said, Word (in fact no part of Office) is *not* designed to be used as
a component from an application. It does work but you may run into lots of
quirks. We had a devil of a time controlling Word remotely from our VB6
application. Most of the problems revolve around the user opening up their
own copy of WINWORD.EXE at the same time and it doing weird things with the
VB6 applications own copy of WINWORD.EXE. In effect, if you're not careful,
your app ends up sharing the same core DLLs as the user launched copy of
WINWORD. The user they closes Word and *bang* it also closes your own
internal instance....

This is with the 2000 and XP flavours. I heard that with Office 2003 they
improved the situation.

You're in a server environment though so the chances of a user opening Word
in the same session are slim.

Cheers, Rob.
Nov 18 '05 #4

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

Similar topics

4
15266
by: David Erickson | last post by:
I need to read some (about 15,000) word documents and add some wrappers around them for importing into a database. What is the best way to read a ..doc file in VB? I would like to save the formatting as .RTF so it can be included. I can do this in Word VBA, but I would prefer to do it in straight VB (either VB6 or .Net). Thanks for any help on this.
9
1599
by: Xah Lee | last post by:
Dear Joe, It is well known that you are an avid hater of Microsoft, from their technologies to their leader to their business practices. I have now and then seen your impassioned expression of this hatred, scattered among your newsgroup posts. Personally, i have an inherent distrust toward big organizations. This applies to Microsoft. Since perhaps 1995, MS has become more and more large, and as well becoming a hate target especially...
476
18299
by: Xah Lee | last post by:
Microsoft Hatred, FAQ Xah Lee, 20020518 Question: U.S. Judges are not morons, and quite a few others are not morons. They find MS guilty, so it must be true. Answer: so did the German population thought Jews are morons by heritage, to the point that Jews should be exterminated from earth. Apparently, the entire German population cannot be morons, they must be
5
2171
by: Niklas Uhlin | last post by:
Someone please explain why Session_Start fires multiple times / retains SessionID values between sessions, when you open an ASP.NET page from MS Word. For details of the problem, see below: 1. Create a new C# ASP.NET web application named "demo" and modify Session_Start in Global.asax.cs as follows: protected void Session_Start(Object sender, EventArgs e) { Response.Write("Session_Start event fired at "+
2
11452
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability, where, after adding a reference to Microsoft.Office.Core and a reference to Microsoft Word I declare objects as follows: Dim oWordApp As New Microsoft.Office.Interop.Word.Application, . Everything works fine on the development computer...
0
2170
by: Nitin | last post by:
How can I create and use Tables in Microsoft word document through VB .net? I've been using the following code for printing an envelope using paragraphs. Tables have to be used for better formatting. ---------------------------------------------------------------------- Dim w As New Microsoft.Office.Interop.Word.Application Dim d As Microsoft.Office.Interop.Word.Document = w.Documents.Add
6
5994
by: SivaSiva | last post by:
Hi, I'm getting the following error when I try convert a word document using asp.net. Application Event Log : Detection of product '{90110409-6000-11D3-8CFE-0150048383C9}', feature 'WordUserData', component '{8ADD2C93-C8B7-11D1-9C67-0000F81F1B38}' failed. The resource 'HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\UserData' does not exist.
1
15941
by: R Reyes | last post by:
ISSUE (reposted) =========================== Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? For many people, they say they add the reference and it works, however when I add the reference the application can't find it. Not sure why it says the system cannot find the file when it exists in that location? Please help, thanks in advance... GOAL ===========================
2
2312
by: djamila | last post by:
Hi, I work in a c# project that uses Microsoft Word to generate report. In my program I use Interop.Word reference. When I run the program in my PC with Microsoft Word 2003, all work well. But when I execute the program in another PC with Microsoft word 2002, I had the following exception: Error in frmDataReview.Report(). System.AccessViolation Exception: Attempted to read or write protected memory. This is often an
4
1976
by: =?Utf-8?B?QXJ0?= | last post by:
Hello, I saw this posting and it is the closest place to ask this question. I am simply trying to create a Word document from a VB application I am wrting with Visual Studio 2005. I cut a pasted a simple routine within the 'click' sub-routine and I'm simple having a problem with resolving the statement 'Dim objWord As New Word.Application' where it is complaining about 'Word.Application' is not defined.
0
8031
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
8456
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
8315
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6792
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
5467
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
3945
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
3989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1309
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.