ASP中的MS Word修改 [英] MS Word Modification in ASP

查看:60
本文介绍了ASP中的MS Word修改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,


我正在尝试修改word文档,以下是我打算做的事情。


1.打开服务器上的Word文档。

2.转到第一行

3.从那里转到第一个表

4.开始插入数据在表格单元格中一个接一个

5.保存并关闭文件

6.为用户提供服务器上的文件链接。

以下是代码


设置wrdobj = Server.CreateObject(" Word.application")

wrdobj.Documents.Open(" ; dup_letter.doc")

WRD.Selection.GoTo:= wdLine,其中:= wdGoToAbsolute,Count:= 1

WRD.Selection.GoTo what:= wdGoToTable ,其中:= wdGoToAbsolute,数量:= 1


以下是遇到的错误


ASP 1077


Server.CreateObject失败


无效的ProgID。有关此消息的其他信息

,请访问Microsoft在线支持网站:
http://www.microsoft.com/contentredirect.asp


请帮助..... :(


谢谢和问候,

Niraj


***通过Developersdex发送 http://www.developersdex.com ***

不要只参加USENET ......获得奖励!

解决方案

" Niraj Khandwala"< kn **** @ vsnl.net>在留言中写道

新闻:uq ************** @ TK2MSFTNGP12.phx.gbl ...

亲爱的,

1.打开服务器上的Word文档。
2.转到第一行
3.从那里去t他先是表格。
4.开始一个接一个地在表格单元格中插入数据
5.保存并关闭文件
6.给用户一个服务器上的文件链接。

以下是代码

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

ASP 1077

Server.CreateObject失败

无效的ProgID。




可能意味着您没有在服务器上安装Word。另请参阅:
http://support.microsoft.com/?kbid = 257757


-

Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
< a rel =nofollowhref =http://mvp.support.microsoft.com/target =_ blank> http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - 用于运行IIS的工具,脚本和实用程序
http://www.tryiis.com


< blockquote>谢谢Tom,

但是在服务器上安装了Ms Office 2000。现在我猜IUSR_macname或IWAM_macname用户有一个

问题。但是为了让他们能够创造对象,需要给予什么样的权利。


去了建议的文章,发现这不是最好的

办公自动化的方法。


但我的目标是你创建模板并保持对任何未成年人的支持

更改我们不必触摸代码。更改模板将花费大部分时间来关注
。你有什么建议。


非常感谢你的帮助


谢谢&此致,

Niraj


***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励!


" Niraj Khandwala" < KN **** @ vsnl.net>在消息中写道

news:eh ************** @ TK2MSFTNGP12.phx.gbl ...

谢谢Tom,
但是Office 2000安装在服务器上。现在我猜IUSR_macname或IWAM_macname用户存在问题。但是为了使它们能够创造对象,需要赋予什么样的权利。

通过建议的文章,发现这不是最好的办公方式自动化。

但我的目标是你创建模板,并保持我们不必触摸代码的任何轻微的改变。更改模板将需要关注大部分事情。你有什么建议。




由于它不受支持而且实施的噩梦,我建议找一个

备用架构。 。


-

Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - 用于运行IIS的工具,脚本和实用程序
http://www.tryiis.com


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

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!

解决方案

"Niraj Khandwala" <kn****@vsnl.net> wrote in message
news:uq**************@TK2MSFTNGP12.phx.gbl...

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/windowsserv...y/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


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

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


"Niraj Khandwala" <kn****@vsnl.net> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...

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/windowsserv...y/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


这篇关于ASP中的MS Word修改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆