MS Word Modification in ASP

N

Niraj Khandwala

Dear all,

am trying to modify a word document, following is what i intend to do.

1. Open the Word document on the server.
2. Goto the First line
3. From there go to the first Table
4. start inserting data in the Table Cell one after another
5. Save and close the file
6. give the user a link of file on the server.

Following is the code

Set wrdobj = Server.CreateObject("Word.application")
wrdobj.Documents.Open ("dup_letter.doc")
WRD.Selection.GoTo what:=wdLine, which:=wdGoToAbsolute, Count:=1
WRD.Selection.GoTo what:=wdGoToTable, which:=wdGoToAbsolute, Count:=1

Following is the error encountered

ASP 1077

Server.CreateObject Failed

Invalid ProgID. For additional information specific to this message
please visit the Microsoft Online Support site located at:
http://www.microsoft.com/contentredirect.asp.

Please HELP..... :(

Thanks & Regards,
Niraj
 
T

Tom Kaminski [MVP]

Niraj Khandwala said:
Dear all,

am trying to modify a word document, following is what i intend to do.

1. Open the Word document on the server.
2. Goto the First line
3. From there go to the first Table
4. start inserting data in the Table Cell one after another
5. Save and close the file
6. give the user a link of file on the server.

Following is the code

Set wrdobj = Server.CreateObject("Word.application")
wrdobj.Documents.Open ("dup_letter.doc")
WRD.Selection.GoTo what:=wdLine, which:=wdGoToAbsolute, Count:=1
WRD.Selection.GoTo what:=wdGoToTable, which:=wdGoToAbsolute, Count:=1

Following is the error encountered

ASP 1077

Server.CreateObject Failed

Invalid ProgID.

Probably means you don't have Word installed on the server. See also:
http://support.microsoft.com/?kbid=257757

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 
N

Niraj Khandwala

Thanks Tom ,
but Ms Office 2000 is installed on the server. now i guess there's a
problem with the IUSR_macname or IWAM_macname user . but what kind of
rights needs to be given in order to enable them to create object.

went thur the suggested article and found that this is not the best
method for office automation.

but my objective is that you create templates and keep so for any minor
changes we donot have to touch the code. changing the template will take
care of most of the things. what do you suggest.

many thanks for your help

Thanks & Regards,
Niraj
 
T

Tom Kaminski [MVP]

Niraj Khandwala said:
Thanks Tom ,
but Ms Office 2000 is installed on the server. now i guess there's a
problem with the IUSR_macname or IWAM_macname user . but what kind of
rights needs to be given in order to enable them to create object.

went thur the suggested article and found that this is not the best
method for office automation.

but my objective is that you create templates and keep so for any minor
changes we donot have to touch the code. changing the template will take
care of most of the things. what do you suggest.

Since it's not supported and a nightmare to implement, I suggest finding an
alternate architecture ...

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 
N

Niraj Khandwala

hi Tom, i got the whole of Ms Office 2000 reinstalled and it worked but
now another error

ASP 1077 8001010A
The message filter indicated that the application is busy.

this is probably because of the anti-virus software installed, the
Microsoft say its only with Norton but we have MacAfee installed.

am now looking at the RTF solution but seems to be very difficult of
convert my existing templates to RTF and specially if there is any
modification in the templates.

Pls advise

Thanks & Regards,
Niraj
 
T

Tom Kaminski [MVP]

Niraj Khandwala said:
hi Tom, i got the whole of Ms Office 2000 reinstalled and it worked but
now another error

ASP 1077 8001010A
The message filter indicated that the application is busy.

this is probably because of the anti-virus software installed, the
Microsoft say its only with Norton but we have MacAfee installed.

am now looking at the RTF solution but seems to be very difficult of
convert my existing templates to RTF and specially if there is any
modification in the templates.

Pls advise

I don't know what else I can advise you. I'm not intimately familiar with
all of the details from your project, nor is this the right forum for
getting it.

The last thing I can suggest is maybe use HTML format for your document -
but I can't write the app for you.

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 
M

myLittleTools.net

am now looking at the RTF solution but seems to be very difficult of
convert my existing templates to RTF and specially if there is any
modification in the templates.

You can have a look at myLittleWriter, a windows script component
which allows to generate RTF on-the-fly from any ASP pages
http://www.myLittleTools.net/mlw


Hope this helps
Elian Chrebor
 
N

Niraj Khandwala

Elian, thanks a lot.. but using third party will require a lot of
approvals and stuf in the organization. will still try.

Tom,
- which is the alternative.
- no i did not want any one to prepare any application for me, am jus
trying to understand a quick and reliable option for creating /
generating letters from ASP.
- thought for all ASP related problems, this was the forum, can you pls
let me know which other forum to try.

thanks for all that.

Thanks & Regards,
Niraj
 
A

ASP.Confused

Sounds like you're using it to maybe run reports? If this is the case,
there's a nice web app out there called Reports.NET. As the name suggests,
it is a .NET assembly (which may or may not work for your situation.) It
generates PDF files.

Description: http://report.sourceforge.net

Download: http://sourceforge.net/projects/report


My opinion is the same as the others that have posted to your
question......it will probably take some considerable coding to use
Word...especially with how cumbersome the COM interface to Office is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top