Solved

ASP+VBScript word automation

Posted on 2007-12-03
5
1,586 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 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