web 2.0

How to use ASP & Config Word (Word.Application)

How to use ASP & Config word (Word.Application) This is learn/tutorial asp developers how to using ASP and Config COM Word (Word.Applciation)

ShotDev Focus:
- ASP & Config Word.Application

Solution

Error Type:
Server object, ASP 0178 (0×80070005)
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
/myasp/asp_word_connect, line 9

or Windows 2003 Server

Server object error ‘ASP 0177 : 800401f3′
Server.CreateObject Failed
/myasp/
asp_word_connect.asp, line 9

Solve Problem

Goto Control Panel -> Administrative Tools -> Event Viewer

ASP & Config word (Word.Application)

Click Event Viewer

ASP & Config word (Word.Application)

User IUSR_WEERACHAI error.

ASP & Config word (Word.Application)

Open Component Services

ASP & Config word (Word.Application)

Click DCOM Config

ASP & Config word (Word.Application)

Right Click Microsoft Word Application -> Properties

ASP & Config word (Word.Application)

On tab Security Click Edit

ASP & Config word (Word.Application)

Click Add

ASP & Config word (Word.Application)

Click Adacned..

ASP & Config word (Word.Application)

Add New user IUSR_Machine-name และ IWAM_Machine-name

ASP & Config word (Word.Application)

Click OK

ASP & Config word (Word.Application)

and Select All Allow

ASP & Config word (Word.Application)

Click OK.
.
.

Example

asp_word_connect.asp


<% Option  Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim WrdApp
Set WrdApp = Server.CreateObject("Word.Application")
If IsObject(WrdApp) Then
Response.write("Word.Application Status Connected.")
Else
Response.write("Cannot Connect to Word.Application")
End IF
%>
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_word_connect.asp

Screenshot

ASP & Config word (Word.Application)

.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.