|
-
Jul 15th, 2004, 06:26 AM
#1
Thread Starter
Addicted Member
client-side automation: word
when the button is clicked, i'd like to open word (the application itself) on the client-machine and it should generate a report of the data the user has just submitted to the server (sql 2000)
because this didn't work as i thought it would, i made a test-project: a page with one button that opens word and a certain document for me...
the code executes, but i don't see word opening on my screen. Under processes a proces winword.exe has started... is there something wrong with my code or is it my configuration?
Code:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"%>
<HTML>
<HEAD>
<title>WebForm1</title>
<script language="vbscript" runat="server">
dim objword
Sub Button_Click(s as Object, e as EventArgs)
objword = CreateObject("Word.Application")
objword.documents.open("C:\testdoc.doc")
objword.visible = true
objword = nothing
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" runat="server" Text="Button" Width="126px" Height="47px" OnClick="Button_Click">
</asp:Button>
</form>
</body>
</HTML>
never argue with an idiot, he will bring you down to his level and will beat you through experience
-
Jul 15th, 2004, 08:06 AM
#2
Retired VBF Adm1nistrator
That code will run on the server. So if you're testing it from the same computer - you'll see the word process start - but its starting "server-side" and not "client-side"...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jul 16th, 2004, 02:29 AM
#3
Thread Starter
Addicted Member
(http://www.infinetsoftware.com/conte...edocuments.asp)
any comments about this technique? is it the best one for what i am trying?
never argue with an idiot, he will bring you down to his level and will beat you through experience
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|