Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP CDO
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 15th, 2004, 08:22 PM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to manage a word or pdf application from ASP??


hello friends,

I am stuck in a problem. iam working on website using ASP. in that, i need to open a word document and populate some data to the word document. here is the first line of code i used:

Dim myword
set myword = createobject("Word.Application")
.
.
.

here is the error i got : "ActiveX component cannot create an object for 'Word.Application' "

so i tried with "server.createobject("Word.Application")".
but it gave me the same error. do anyone of think that i need a word application component(DLL library) for this? if so, where can i get it
and how to register in server? please reply me soon

Thank you for your considereation

santhosh


 
Old September 16th, 2004, 03:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

This is generally a permissions or security issue, have you tried searching in Google on the error message ?
 
Old September 16th, 2004, 11:41 PM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello Gregg

you mean there is no need of installing another dll library for managing Word application..? if it security issue, can you please tell mehow can we do it.

regards
joseph

 
Old September 20th, 2004, 01:31 AM
Registered User
 
Join Date: Oct 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Santhosh,

I think you are trying to open a word document from your asp page and want to edit that document.

But I'm not clear whether you are trying to open it on server or client side.

Whereever you want to open you need to have ms-word installed on the computer. Without this you can not create word application object.

Supposing that you are trying to open client side, this is the way you can use.

You can test the code by creating a vbs file like this:
Open notepad and copy this code:

Dim w
set w=createobject("word.application")
w.documents.open(path of the doc in double quotes)
w.visible=true
set w=nothing

Save the file as .vbs. Execute it by double clicking. This should open the mentioned document in ms-word.


To use it in asp firstly, the internet settings is must:

1. In IE goto tools>>internet options>>security>>select intranet>>custom level.
2. Then enable/prompt the 'Initialize and Script activex controls not marked as safe'.

Note: I'm not sure whether you will be allowed to have ms-word on a webserver and open a document internally, if you are trying to do this on server side.

Hope this will help.

Any further assistance you post further.

M.L.Srinivas

 
Old September 20th, 2004, 10:10 AM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Srinivas,

Thank You for your help.
Srinivas, what iam trying to do is, i have a word document in web server. From browser, i want to send form letter(or notification letter) to our clients. what i want is, open the word document which is in webserver, populate some information from the ASP form to that word document and save it as(saveAs) new file in web server and send email to the particular client with the newly created document as attachment.

moreover do you any site from which we can get a free download for Word.Document component

hoping your reply soon
Thank You
Santhosh

 
Old September 22nd, 2004, 06:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Santhosh,

How about installing MS Office?

_________________________
- Vijay G
Strive for Perfection
 
Old September 22nd, 2004, 11:07 PM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello Vijay,

thanks for hearing from you. Vijay, Iam still around in my problem. you mean install the whole MS Office package in server? see the problem is, I am already working on website. when i asked lots of our friends, i got 2 different kinds of answers. one group says install the ms word in web server. one group says install the DLL components probably(Word.Application) in server. what do you think? do you have any sound solution for this?

hoping reply soon from you
Santhosh

 
Old September 23rd, 2004, 04:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am not sure what all DLLs would be involved to get that work, thats why I suggested install MS office. May be you can install Word alone from MS office. That should help.

Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF from ASP.NET application jamesbondajay ASP.NET 2.0 Professional 5 December 12th, 2013 04:48 AM
Word to Pdf Convertor c#.net Web Application aveekb ASP.NET 1.0 and 1.1 Professional 2 July 24th, 2013 04:11 AM
Dot net - Converting word to pdf and pdf to word Manoah Classic ASP Basics 2 July 7th, 2008 10:21 PM
how to enter data to pdf or word doc from ASP joseph007 Classic ASP Professional 3 July 10th, 2007 05:52 AM
ow to enter data in to a pdf or word doc from ASP joseph007 Classic ASP Components 0 September 15th, 2004 08:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.