homepage Welcome to WebmasterWorld Guest from 184.73.104.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
ASP to create MSWORD
What am i missing here...?
Morrison

10+ Year Member



 
Msg#: 174 posted 12:53 pm on Aug 28, 2002 (gmt 0)

Hi

The following code:


<%@ LANGUAGE="VBSCRIPT" %>
<%
Dim MyDoc
Set MyDoc = Server.CreateObject("Word.Document")
Response.ContentType = "application/msword"
MyDoc.Application.Visible = True
Set MyDoc = Nothing
%>

I get the following error:

Server object, ASP 0177 (0x80080005)
Server execution failed

I'm using IIS5 on WinXpPro with Office2k.

Does anyone know why it happens?
(i Guess it got something to do with the components...)

 

aspdaddy

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 174 posted 1:04 pm on Aug 28, 2002 (gmt 0)

Not sure, but dont you need to create a word.application first?

What are you trying to do, make the document visible on the web server ?

Morrison

10+ Year Member



 
Msg#: 174 posted 1:15 pm on Aug 28, 2002 (gmt 0)

All i'm trying to do is to create a simple document.

Let's take this sorce code for example:

<%
Dim MyDoc
Set MyDoc = Server.CreateObject("Word.Document")
Response.ContentType = "application/msword"
MyDoc.Application.Visible = True
MyDoc.content.Font.Bold = True
MyDoc.content.Font.Italic = True
MyDoc.content.Font.Underline = True
MyDoc.content.Font.Name = "Comic Sans MS"
MyDoc.content.Font.Size = 25
MyDoc.content.insertAfter "word1 word2 word3 word4"
MyDoc.content.InsertParagraphAfter
MyDoc.Words(1).Font.Size = 10
MyDoc.Words(1).Font.ColorIndex = 1
MyDoc.Words(2).Font.Size = 20
MyDoc.Words(2).Font.ColorIndex = 2
MyDoc.Words(3).Font.Size = 30
MyDoc.Words(3).Font.ColorIndex = 3
MyDoc.Words(4).Font.Size = 40
MyDoc.Words(4).Font.ColorIndex = 4
MyDoc.PrintOut
Set MyDoc = Nothing
%>

it works on my PWS on WIN98, but not on my WinXP IIS5.

The error code on my log says something like:

The server {00020906-0000-0000-C000-000000000046} did not register with DCOM within the required timeout.

any idea?

Xoc

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 174 posted 4:29 pm on Aug 28, 2002 (gmt 0)

It might be that you have Word installed incorrectly. I would try reinstalling it. I base that on this [msdn.microsoft.com] info from the Microsoft web site.

There are also some issues with activating an out of process program from an Active Server Page. In IIS 4.0, there was a metabase variable that you had to set, but apparently that is no longer required in IIS 5.0.

Morrison

10+ Year Member



 
Msg#: 174 posted 5:30 pm on Aug 28, 2002 (gmt 0)

I,ve been in the Microsoft page your talking about.

I tries to reinstall all my office.

still,

Not working.

I'm 98% positive the problem is with my IIS and not with the Office.

9thsign

10+ Year Member



 
Msg#: 174 posted 5:43 am on Oct 31, 2002 (gmt 0)

could be a permissions issue. To test, you might want to create a temp Virtual directory and then give execute, read, write, etc. permissions in IIS.

I use a process in a ColdFusion app that creates an instance of MS Word. When I first did it I was getting a similar error from the ColdFusion Service. I just gave the proper permissions in IIS, the physical directory in Win2k, and checked an option under services that stated "enable interaction with desktop". Worked fine after that.

You might want to comment your code after
Dim MyDoc
Set MyDoc = Server.CreateObject("Word.Document")

to see if this line is giving you the problem, if not then comment line by line to find out which specific line is the problem.

txbakers

WebmasterWorld Senior Member txbakers us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 174 posted 6:31 pm on Oct 31, 2002 (gmt 0)

I sent you a sticky mail with an off this topic but related question.

Morrison

10+ Year Member



 
Msg#: 174 posted 6:57 pm on Oct 31, 2002 (gmt 0)

and i answer you :-)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved