Solved

ASP+VBScript word automation

Posted on 2007-12-03
5
1,590 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

615 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