473,473 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Automating Word Document creation from ASP.NET

mc
I've know that Microsoft don't currently recommend this process, what
I'm trying to find out is why?

This is a feature that I've used (with Classic ASP) in the past with a
great deal of success.

Regards
MC
Nov 6 '06 #1
10 2001
Because of the licensing issues. It shouldn't make any difference what
server-side platform you are using.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...
I've know that Microsoft don't currently recommend this process, what I'm
trying to find out is why?

This is a feature that I've used (with Classic ASP) in the past with a
great deal of success.

Regards
MC

Nov 6 '06 #2
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...
I've know that Microsoft don't currently recommend this process, what I'm
trying to find out is why?
http://www.aspose.com/wiki/default.a...utomation.html
This is a feature that I've used (with Classic ASP) in the past with a
great deal of success.
Then you've either been very lucky, or your site has had a tiny number of
concurrent connections trying to instantiate Word...
Nov 6 '06 #3
because word is not designed for this. you will run into scaling and memory
usage issues.

-- bruce (sqlwork.com)
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...
I've know that Microsoft don't currently recommend this process, what I'm
trying to find out is why?

This is a feature that I've used (with Classic ASP) in the past with a
great deal of success.

Regards
MC

Nov 6 '06 #4
mc
Mark Rae wrote:
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...

>>I've know that Microsoft don't currently recommend this process, what I'm
trying to find out is why?


http://www.aspose.com/wiki/default.a...utomation.html

>>This is a feature that I've used (with Classic ASP) in the past with a
great deal of success.


Then you've either been very lucky, or your site has had a tiny number of
concurrent connections trying to instantiate Word...

On our current system word is invoked 25-50 times a day, so I'd guess
our success is mainly due to that!

Nov 6 '06 #5
"bruce barker (sqlwork.com)" <b_*************************@sqlwork.comwrote
in message news:eP**************@TK2MSFTNGP04.phx.gbl...
because word is not designed for this. you will run into scaling and
memory usage issues.
Quite so, although the OP implies that he has an absolutely tiny hit-rate
(less than 50 a day), so he probably hasn't encountered many problems so
far...
Nov 6 '06 #6
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...
On our current system word is invoked 25-50 times a day, so I'd guess our
success is mainly due to that!
I guess so!

On another note, I'm assuming you know that you don't actually *need* Word
at all to create valid Word documents... You don't even need a 3rd-party
utility like Aspose. All you need is the ability to generate XML in the form
that Word understands. Unless your Word documents are *very* complex and/or
*very* large, this can be achieved quite simply and efficiently. If you take
one of your existing Word documents, open it in Word, click Save As and
choose the XML format, you can then open the XML document and see how it's
structured.

Assuming all your users have fairly recent versions of Word (the last two, I
think), if you take such an XML document and give it a .doc extension, Word
will open it directly without any problems...

You can use the same technique for other Office apps e.g. Excel, PowerPoint
etc.
Nov 6 '06 #7
Server side COM automation with Office is not recommended or supported by
Microsoft. Here is their official statement on the subject:
http://support.microsoft.com/default...US;q257757#kb2

Here are some tips and suggestions for working with Word (and Excel) the
right way:
http://SteveOrr.net/articles/ExcelExport.aspx
http://SteveOrr.net/articles/ExportPanel.aspx
http://SteveOrr.net/reviews/AsposeWord.aspx
http://SteveOrr.net/reviews/OfficeWriter.aspx
http://msdn.microsoft.com/office/understanding/vsto/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...
I've know that Microsoft don't currently recommend this process, what I'm
trying to find out is why?

This is a feature that I've used (with Classic ASP) in the past with a
great deal of success.

Regards
MC

Nov 6 '06 #8
mc
Mark Rae wrote:
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...

>>On our current system word is invoked 25-50 times a day, so I'd guess our
success is mainly due to that!


I guess so!

On another note, I'm assuming you know that you don't actually *need* Word
at all to create valid Word documents... You don't even need a 3rd-party
utility like Aspose. All you need is the ability to generate XML in the form
that Word understands. Unless your Word documents are *very* complex and/or
*very* large, this can be achieved quite simply and efficiently. If you take
one of your existing Word documents, open it in Word, click Save As and
choose the XML format, you can then open the XML document and see how it's
structured.

Assuming all your users have fairly recent versions of Word (the last two, I
think), if you take such an XML document and give it a .doc extension, Word
will open it directly without any problems...

You can use the same technique for other Office apps e.g. Excel, PowerPoint
etc.

Unfortunately I currently use the word automation to create a
complicated document, during the automation I dynamically create tables,
I will however look into this as I like the XML template Idea!

Thanks
MC
Nov 8 '06 #9
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...
I will however look into this as I like the XML template Idea!
In almost all situations, it can be an extremely efficient solution.

Obviously, ASP.NET and XML are pretty much "made for each other", so you
almost certainly won't have any problems in actually generating the XML
itself...

Assuming you go down this route and get it working, I would strongly suggest
that you uninstall Word / Office from your webserver, as you will no longer
need it - also, that will mean you will no longer need to worry about
whether you need a separate Word licence for every possible visitor, for
every concurrent visitor only, or just for the server itself... :-)
Nov 8 '06 #10
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B5**********************************@microsof t.com...
After saving my document as XML and looking at the source how do i get
started and programming against the xml document?
Same way you would manipulate any other XML document... The XML schemas for
the Office suite are readily available:
http://www.google.co.uk/search?sourc...ord+xml+schema
if i wanted to take a customer in Northwind and their orders and display
it
in word is this somethng i can do easily with xml tip?
I suppose that really depends on your definition of "easily"...

At the end of the day, XML is XML is XML - if you're fairly familiar with
XML documents and transformations, this will present very little difficulty
to you. If, on the other hand, you've never used XML before, you'll have a
bit of a learning curve - same as you would have with any other technology
new to you...

On the other hand, if you don't need all of the minute detail that the XML
format will give you, you can just as easily (probably much more so!) create
a simple HTML document and give it a .doc extension - that will cause Word
to open it, whereupon it will recognise it as an HTML document and render it
accordingly...

E.g.

1) Open Notepad

2) Paste the HTML below:

<html>
<body>
Hello
</body>
<html>

3) Save it as C:\Test.doc

4) Close Notepad

5) Double-click C:\Test.doc
Dec 8 '06 #11

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

Similar topics

10
by: Neil | last post by:
An article at http://news.com.com/2100-1012-991694.html?tag=fd_top states: "XML would allow easier interchange of data generated in Office documents with back-end systems or existing Web...
0
by: gizmo | last post by:
We have a requirement to initiate more than one instance of an application using the filenames. (the example below will start two instances of MS Word). The problem is that we need to close each...
4
by: Rob | last post by:
Here is my issue: I am trying to load word through vb.net code behind an ASP.NET webform. I know it is possible to use the Automation and COM classes because a co-worker has it working on his...
2
by: Al_P via DotNetMonster.com | last post by:
I have: Win2K Office2000 Working in VB.Net (2003) My .Net project has a reference to Word 9.0 Instantiating things in a simple and straightforward manner: Dim word as Word.Application Dim...
1
by: John Welch | last post by:
I'm trying to use the Mergit() function from the MS Knowledge base article to merge data from a query or table in my Access 2000 mdb into an existing word merge document. Every time it runs it...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
5
by: jmar | last post by:
I posted a week ago and received one response. I'm looking for the opinion of several experienced .NET people before I proceed so I'm posting again. Sorry for the repost... I am updating a...
1
by: deedeem | last post by:
Hi there, I am having trouble getting all my records to be placed into my WORD document from my ACCESS form. I have a form with a subform displayed and a control button that executes a macro. The...
2
by: chutney | last post by:
Dear all, please excuse the fact that this is not an explicit problem I have, but more of a general query. I have an Access database (2003) with a load of contact details in it. Including various...
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
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,...
1
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
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
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...

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.