473,757 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CreateObject("w ord.Application ")

I'm trying to display a word document inside a web page, but everytime I do
I get this error:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'

Does anybody know the correct way to do this? I don't want to link to a
document, but rather display a word file inside the asp page.

Any help will be greatly appreciated!

Clay
cl***********@h otmail.com
Jul 19 '05 #1
4 16186
I would think you can just set Response.Conten tType and stream the file to
the browser. Why would you be creating a Word Application object on the
server ? Are you perhaps dynamically creating the file on the fly in the asp
? These are really two separate issues.

"Microsoft" <cl***********@ hotmail.com> wrote in message
news:ub******** ******@tk2msftn gp13.phx.gbl...
I'm trying to display a word document inside a web page, but everytime I do I get this error:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'

Does anybody know the correct way to do this? I don't want to link to a
document, but rather display a word file inside the asp page.

Any help will be greatly appreciated!

Clay
cl***********@h otmail.com

Jul 19 '05 #2
"Microsoft" <cl***********@ hotmail.com> wrote in message
news:ub******** ******@tk2msftn gp13.phx.gbl...
I'm trying to display a word document inside a web page, but everytime I do I get this error:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'

Does anybody know the correct way to do this? I don't want to link to a
document, but rather display a word file inside the asp page.

Any help will be greatly appreciated!


You can't really "display a word file inside the asp page". You could
simulate it using an IFRAME perhaps.

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

Jul 19 '05 #3
I'm creating a page that pulls a document from a server. The whole concept
is for ISO. The header of the document is controlled by an SQL database.
Once the header of the document is displayed I need to be able to insert the
form (which is the word document) right below the header. I did think of
using frames and just use a "link" which would populate the bottom frame
with the document, but I was hoping that I would be able to insert the
document in the web page where it looks as if it is just one web
page....header and the form. I hope that makes sense.

For a test I downloaded the following code which is suppose to display a
document in the web page. It is as follows, but I get the same error:

<HTML>
<HEAD>
<TITLE>Using ASP To View & Print A Word Document</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY bgcolor="#FFFFF F">
<FORM method="post" action="WordVie wer.asp" name="frmMain">
<TABLE width="600" border="1" cellspacing="0" cellpadding="4"
align="center" bordercolor="#0 00000">
<TR>
<TD colspan="2" align="left" valign="top" bgcolor="#00000 0"><FONT
size="2" face="Verdana, Arial, Helvetica, sans-serif"
color="#FFFFFF" ><B>Viewing
& Printing MS Word Documents Using ASP</B></FONT></TD>
</TR>
<TR align="left" valign="top" bgcolor="#99999 9">
<TD width="40%" rowspan="2"><FO NT size="2" face="Verdana, Arial,
Helvetica, sans-serif">Word
Document To View Print<BR>
<INPUT type="File" name="fldFilePa th">
</FONT></TD>
<TD width="60%"><FO NT size="2" face="Verdana, Arial, Helvetica,
sans-serif">
<INPUT type="checkbox" name="chkPrint" value="PrintDoc ">
<FONT size="1">Check To Enable Printing</FONT></FONT></TD>
</TR>
<TR align="left" valign="top">
<TD width="60%" align="left" valign="top" bgcolor="#99999 9"><FONT
size="2" face="Verdana, Arial, Helvetica, sans-serif"><FONT size="1">
<INPUT type="submit" name="Submit" value="Open Document">
</FONT></FONT></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
<%

'our variable
Dim strDocPath
Dim intPrintCount

'get the path To the document to
'view and the value To see if the
'user wants To print this document
strDocPath = Request.Form("f ldFilePath")
bolPrintDoc = Request.Form("c hkPrint")
'lets see if we have a path
'if we Do Then show the doc
if strDocPath > "" Then
'we have a path so lets show the document

'create the object
Set objWord = CreateObject("W ORD.Application ")
'Show The Word Application
objWord.Visible = True
'open the document
objWord.Documen ts.Open strDocPath
'lets see if we need To print it out
if bolPrintDoc = "PrintDoc" Then
'lets print it To the default printer
objWord.PrintOu t
End if
'clear it from mem
Set objWord = Nothing
End if
%>

"Microsoft" <cl***********@ hotmail.com> wrote in message
news:ub******** ******@tk2msftn gp13.phx.gbl...
I'm trying to display a word document inside a web page, but everytime I do I get this error:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'

Does anybody know the correct way to do this? I don't want to link to a
document, but rather display a word file inside the asp page.

Any help will be greatly appreciated!

Clay
cl***********@h otmail.com

Jul 19 '05 #4
How about saving the Word doc as html ? You may be able to do this with
automating Word.Applicatio n like you were originally attempting. Create the
object, run the SaveAs function, close the object, append the new html file
to your output with #include or something...
"Microsoft" <cl***********@ hotmail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I'm creating a page that pulls a document from a server. The whole concept is for ISO. The header of the document is controlled by an SQL database.
Once the header of the document is displayed I need to be able to insert the form (which is the word document) right below the header. I did think of
using frames and just use a "link" which would populate the bottom frame
with the document, but I was hoping that I would be able to insert the
document in the web page where it looks as if it is just one web
page....header and the form. I hope that makes sense.

For a test I downloaded the following code which is suppose to display a
document in the web page. It is as follows, but I get the same error:

<HTML>
<HEAD>
<TITLE>Using ASP To View & Print A Word Document</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </HEAD>
<BODY bgcolor="#FFFFF F">
<FORM method="post" action="WordVie wer.asp" name="frmMain">
<TABLE width="600" border="1" cellspacing="0" cellpadding="4"
align="center" bordercolor="#0 00000">
<TR>
<TD colspan="2" align="left" valign="top" bgcolor="#00000 0"><FONT
size="2" face="Verdana, Arial, Helvetica, sans-serif"
color="#FFFFFF" ><B>Viewing
& Printing MS Word Documents Using ASP</B></FONT></TD>
</TR>
<TR align="left" valign="top" bgcolor="#99999 9">
<TD width="40%" rowspan="2"><FO NT size="2" face="Verdana, Arial,
Helvetica, sans-serif">Word
Document To View Print<BR>
<INPUT type="File" name="fldFilePa th">
</FONT></TD>
<TD width="60%"><FO NT size="2" face="Verdana, Arial, Helvetica,
sans-serif">
<INPUT type="checkbox" name="chkPrint" value="PrintDoc ">
<FONT size="1">Check To Enable Printing</FONT></FONT></TD>
</TR>
<TR align="left" valign="top">
<TD width="60%" align="left" valign="top" bgcolor="#99999 9"><FONT
size="2" face="Verdana, Arial, Helvetica, sans-serif"><FONT size="1">
<INPUT type="submit" name="Submit" value="Open Document">
</FONT></FONT></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
<%

'our variable
Dim strDocPath
Dim intPrintCount

'get the path To the document to
'view and the value To see if the
'user wants To print this document
strDocPath = Request.Form("f ldFilePath")
bolPrintDoc = Request.Form("c hkPrint")
'lets see if we have a path
'if we Do Then show the doc
if strDocPath > "" Then
'we have a path so lets show the document

'create the object
Set objWord = CreateObject("W ORD.Application ")
'Show The Word Application
objWord.Visible = True
'open the document
objWord.Documen ts.Open strDocPath
'lets see if we need To print it out
if bolPrintDoc = "PrintDoc" Then
'lets print it To the default printer
objWord.PrintOu t
End if
'clear it from mem
Set objWord = Nothing
End if
%>

"Microsoft" <cl***********@ hotmail.com> wrote in message
news:ub******** ******@tk2msftn gp13.phx.gbl...
I'm trying to display a word document inside a web page, but everytime I

do
I get this error:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'

Does anybody know the correct way to do this? I don't want to link to a
document, but rather display a word file inside the asp page.

Any help will be greatly appreciated!

Clay
cl***********@h otmail.com


Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
13573
by: The Roys | last post by:
Hi Im doing something wrong in quitting the Word.Application in my VB program. I have General Declarations Dim AppWord As Word.Application Form_Load() Set AppWord = CreateObject("Word.Application")
3
5344
by: Greg Andora | last post by:
Hello, I've had an ASP page that worked for at the minimum for a year and now it is acting very odd and I need some help to fix it. What my page does/did is creates a Word.Application object and a new document from a template. It then proceeds to fill in a bunch of the information on the word document using bookmarks and data from a database. Then it saves the document to a directory and sends the user off to go get the new document. ...
2
10245
by: MaxiWheat | last post by:
Hi, I am using a software that uses MS Word to create PDF files. When I try to run the sample code (ASP 3.0), I get an error on this statement : Set oWord = Server.CreateObject("Word.Application") That error says : The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
2
5510
by: POLILOP | last post by:
When i try to do this Dim ExcelFace Set ExcelFace = CreateObject("Excel.Sheet") ......... the browser says this Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied: 'CreateObject'
0
1541
by: Svet | last post by:
CreateObject("Excel.Application") on NT 4.0 hangs and I have to kill the Access 97 app that it is running on. The same code works fine as a stand alone code. This occurs on users' machines thatt have weird builds and I was wondering if anyone has seen this and can shed some light what I can look into. Thanks.
4
8011
by: Darryl Kerkeslager | last post by:
Below is a section of the code I use to open Word with late binding, insert text at the selected bookmarks, and make Word visible. Everything works fine. However, I also have some Word check boxes, that I cannot figure out how to make 'checked'. I am not allowed to alter the layout of the form; it must be a check box. Up until now, I have simply required users to check the box themselves, but now I'm opening up four Word forms that all...
5
9372
by: KC | last post by:
Hi, I have code similar to this.. Dim xlApp As Object xlApp = CreateObject("Excel.Application", "\\MyServer") The call is from a asp.net (Intranet) application. \\Myserver is a network computer in the same domain as web server. The only way I can get this call worked is when I add the user who logs on to the web site as Administrators. I need to get this working without having to make the user administrator. Any suggestion?
1
6587
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the server don´t response right. xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
1
4868
by: David Di Donato | last post by:
hi i have a big problem. i have an asp file with the following source code.... ****** Set r_ = Server.CreateObject ("Access.Application.10") s1 = "DoAnything()" with r_
0
9487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9904
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9735
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7285
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2697
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.