Solved

ASP+VBScript word automation

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

21 Experts available now in Live!

Get 1:1 Help Now