all groups > inetserver asp components > march 2004 >
You're in the

inetserver asp components

group:

Microsoft Office for Automation



Microsoft Office for Automation torrelm NO[at]SPAM hotmail.com
3/30/2004 12:04:01 PM
inetserver asp components: Environment:
- Windows 2000 Server
- Office XP Professional (Full installation)
- IIS 5.0 with ASP

I have a word document, which is my template (template.doc). In a
first moment, in a Web Page, I request the user identification
(login). He types his login and click Next button.

At this moment I will search all his information in my database, like
Name, Title, Phone Number, City, etc., and I will automatically fill
this word document with all his information.

Bellow is the code I am using:

<%
'START CODE
Dim objWord

'I HAVE TRIED BOTH LINES
'Set objWord = CreateObject("Word.Application")
Set objWord = Server.CreateObject("Word.Application")

objWord.visible = True
objWord.Documents.Open "c:\Inetpub\wwwroot\template.doc"
objWord.Documents.Add.Content = "Text goes here"

Set objWord = Nothing
'END CODE
%>

THE PROBLEM IS:
When I run this CODE it doens't open a word document. Nothing happens.
This critical for me. I appreciate if anybody can help soon.

Also, I have tried those configurations on my Web server and nothing
happened. Thos articles are on Microsoft KnowledgeBase.
288366 HOWTO: Configure Office Applications to run under a specific
Re: Microsoft Office for Automation Tom Kaminski [MVP]
3/31/2004 8:28:28 AM
[quoted text, click to view]

That's a bad idea - read this:
http://support.microsoft.com/?kbid=257757

[quoted text, click to view]

Try this instead:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;270906

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


AddThis Social Bookmark Button