Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP Question
Message
De
17/02/2001 14:09:54
Jacci Adams
Lindsay-Adams Consulting
Louisville, Ohio, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
ASP Question
Divers
Thread ID:
00477015
Message ID:
00477015
Vues:
55
Hi All,

This question is for my husband (I don't have much experience with web page creation, but lots with VFP & COM). He is working on a project creating a Web application. He is using ASP to create the pages. The data is stored in SQL 7. What he wants to do is have a button on an ASP created Web page that the user can click to generate a Word Document report from the SQL 7 data. Before/After creation of the Word document the user is prompted to save it on their hard drive. I think he needs to do some VB scripting.

Something along the lines of:
SQL = SELECT customer, widget from CustWidget where customer = 'SMITH' 
set rs = Conn.Execute(sql)
set oWord = CreateObject('Word.Application')
set oDocument = oWord.Documents.Add()
set oRange = oDocument.Range()
oRange.InsertAfter('Customer ID:'+ rs('customer')+ CHR(13) )
oRange.InsertAfter('WigitID:'+ rs('widget')+ CHR(13) )
.
.
.
** finished creating Word document
** ...prompt user for file name
oWord.ActiveDocument.SaveAs(lcFileName)
Is this the correct syntax? Does the whole block of code have to be wrapped in %?

TIA,

Jacci
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform