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

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 1355

"mark" <ma**@remove.com> wrote in message news:OYktc.53$yc4.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****************@TK2MSFTNGP10.phx.gbl...

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

news:OYktc.53$yc4.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.Application
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
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...
9
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...
476
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...
5
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....
2
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,...
0
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...
6
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...
1
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...
2
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....
4
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.