Go Back  Xtreme Visual Basic Talk > Other Languages > Web Programming > help with error


Reply
 
Thread Tools Display Modes
  #1  
Old 04-19-2006, 09:32 AM
FEINDFOLIO FEINDFOLIO is offline
Junior Contributor
 
Join Date: Nov 2003
Location: va beach
Posts: 207
Default help with error


hello,
i am tring to do labels using asp 3.0 and from searching this forum i found a code snippet that would open a word template and give the results. this could work making my template pull from a database that the resultd sof a search populated. but when i run the code i get this error

active x component cant create object ("word.application")

here is the code. remeber i am just tring this way out so i dont have a lot of code just the part that is bringing up the memo.dot file. i will build from that when i get this to work.
HTML Code:
<%@ LANGUAGE=VBSCRIPT %>
<% OPTION EXPLICIT %>


<html>

<head>
<title>label_generator</title>
</head>

<body>

</html>
<SCRIPT LANGUAGE=VBScript>

Dim objWord

Sub Btn1_onclick()
call OpenDoc("\memo.dot")
End Sub

Sub OpenDoc(strLocation)
Set objWord = CreateObject("Word.Application")
objWord.Visible = true
objWord.Documents.add strLocation
End Sub

</script>
</body>
<INPUT TYPE=BUTTON NAME=Btn1 VALUE="Open Word Doc">

thank you for your help
__________________
life is like a box of chocalate, sometimes you get a nasty one

Last edited by wayneph; 04-19-2006 at 09:42 AM. Reason: please use [vb], [html] or [code] tags for posting code
Reply With Quote
  #2  
Old 04-19-2006, 09:44 AM
wayneph's Avatar
wayneph wayneph is offline
Web Junkie

Retired Moderator
* Expert *
 
Join Date: Apr 2004
Location: D/FW, Texas, USA
Posts: 8,393
Default

1. Is word installed on the machine where the browser is?
2. Are you using Internet Explorer?
3. Is memo.dot on the root of the client machine. (note that your path isn't to the server.)
4. What security settings do you have set up in your browser.

My guess is that you problem is the last one. I wouldn't allow my browser to create a Word object, and definately wouldn't give it access to my hard drive.
__________________
-- wayne, MSSM Retired
> SELECT * FROM users WHERE clue > 0
0 rows returned
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->