Solved

ASP+VBScript word automation

Posted on 2007-12-03
5
1,582 Views
Last Modified: 2010-05-18
Hi Experts,

       I had a lines of codes in ASP VBScript that used to create a word document. But having problem when trying to run the script at the server as it took so long to process this line: owordapp.Documents.Open (App.Path & "\sample.doc") until it reached its server timeout so the process was unsuccessful. What I want to do is to open a one word document then the other document will be inserted to to the first document and I need to get this line working owordapp.Documents.Open (App.Path & "\sample.doc"). It is working good in my local pc but when tried to run on the server took so long to load that lead to unsuccessful process.

       If you know other way how to automate word using ASP it would be a great help. Or anyone here knows how to insert header and footer to an existing word document. Header/Footer may contains images and texts.

Thanks,

Marj
0
Comment
Question by:barman78
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 250 total points
ID: 20396888
There are several other ways.

1. Use RTF. RTF is a plain text file, that you can easily create with ASP. The only problem is that you need to dive into RTF.  The best way is to save a sample Word document as RTF, and study the code in plain text.

2. Use Word-XML. Same thing. Save a Word document as XML (which is also plain text) and study the code. Works in Office 2003 and higher. It is really nice that you can generate office-xml with XSLT (provided that you create the content as XML).

Webservers usually do not have Office installed, so using Word.Application is not going to work then.
0
 

Author Comment

by:barman78
ID: 20402484
But my sample.doc contains images/pictures does using RTF supports this too? that sample  doc was generated by the code which data are from database.
0
 
LVL 28

Expert Comment

by:sybe
ID: 20402517
RTF supports bitmaps.

Just try it out. Add an image to a document and save as RTF. Then open it as plain text.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21135879
Forced accept.

Computer101
EE Admin
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now