473,586 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

linking ASP to client MS Word

Hi guys

Basically, I want to be able to print labels and invoices (via MS Word) for
net orders, using our ASP site admin system.

Heres the code I've come up with...

<%
Call OpenDBConnectio n("data")

set labeldata = dConn.Execute(" SELECT * FROM Orders ORDER BY OrderNo DESC")

address = labeldata("Cart ID")
firstline = labeldata("Cart ID")
address = address & vbCrLf & labeldata("Name ") & vbCrLf &
labeldata("Addr ess") & vbCrLf & labeldata("Post Code") & vbCrLf &
labeldata("Coun try")

labeldata.Close ()
set labeldata = nothing

set app = createobject("W ord.Application ")
app.Application .Visible = True
app.Documents.A dd()
app.Selection.T ypeText(address )
app.Selection.W holeStory()
app.Application .MailingLabel.D efaultPrintBarC ode = False
app.Application .MailingLabel.P rintOut "2160 Mini", firstline,
wdPrinterManual Feed, true, 1, 1

Call CloseDBConnecti on()
%>

This works fine with my localhost IIS5, however, I suspect that when I
transfer this to the webserver, it's gonna try and run Word on the server.
What we wanna do is run the code on the server, so that it loads Word on the
client machine and prints the labels.

How can this be done? Any help greatly appreciated!

Cheers
Dan
Jul 19 '05 #1
1 1501
> What we wanna do is run the code on the server, so that it loads Word on
the
client machine and prints the labels.


This is a contradiction. You can't run code on the server that even thinks
about touching Word on the client (yes, even in an Intranet scenario). You
need a client-server application, not a web page, to do this.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #2

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

Similar topics

1
2633
by: Ben | last post by:
Hi all, I'm relatively new to C++ and have a quick question concerning a better way to perform runtime linking. Currently a client wishes to create a class in a .dll. I export 2 methods from my dll to assist in this called create(IBase**) and delete(IBase**). The IBase interface exists in both client and .dll, but in the .dll there is also...
20
3215
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external references to functions and objects not defined in the current translation. All such translator output is collected into a program image which contains...
18
3062
by: Mark P | last post by:
I have a bit of vb code that uses Tables.Append to programatically link tables from Oracle and DB2 datasources. The problem I am having on some client machines is that the link will take anywhere from 1 to 3 minutes to link the table. When I manually link the tables,through Access, it takes no time at all. Note that only certain client have...
2
4129
by: Matthew Wells | last post by:
Good morning... I have an Access front end that uses SQL Server linked tables. SQL Server uses Windows authentication. I have one Windows group that all Access users are a member of. I added that group to SQL Server logins and gave it public, datareader, and datawriter rights to the one database that's used. My front end is locked down,...
6
5190
by: Yuri Vanzine | last post by:
In asp we can run VBSCRIPT client-side which allows for 'easy' :?) ms office COM object instantiation. How do I access a Word object in ASP.NET on the client side? I would like to do spell checking from a web-based wysiwyg editor and I am limited to using ms word from the client, server-side word automation is out of the question for...
1
1608
by: Joel Barsotti | last post by:
Is there anything builtin to ASP.net that allows you to tie a text box to a button so when you press enter in the text box it emulates clicking a near by button. I've coded up some client side javascript that does this, but it fails when their is a validator monitoring the text box (in firefox, but that's 10% of my visitors).
2
12623
by: ashesman | last post by:
OK, I have written an application in MS Visual C# using .net. Is it posibble to static link into one self contained .exe file? This would certainly make distribution of a small accessory file much easier. And allow it to be easily packaged and installed with our other applications built in an old C++ builder. If static linking is possible,...
1
2051
by: Andrew Wan | last post by:
I am having problems linking an assembly object with my C object files. Am getting: Linker Warning: DOSSEG directive ignored in module asm.asm Linker Error: Undefined symbol _ASMClsV in module main.c Linker Error: Undefined symbol VADDR in module asm.asm In my asm.asm file I've got: DOSSEG
2
4938
by: mburns | last post by:
Hello all- I was wondering if it is possible to link an Access query or table to a Word document and pull specific information into Word by manually entering a unique identifier, which would then pull all related fields from Access to the Word document. My goal is to develop a Word template that pulls certain fields from an Access query or...
0
7841
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...
0
8204
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
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...
1
7965
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...
0
8220
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...
1
5712
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...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3838
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.