Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP+VBScript word automation

Posted on 2007-12-03
5
Medium Priority
?
1,591 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 1000 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

704 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