Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASP Question
Message
From
17/02/2001 14:09:54
Jacci Adams
Lindsay-Adams Consulting
Louisville, Ohio, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
ASP Question
Miscellaneous
Thread ID:
00477015
Message ID:
00477015
Views:
56
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
Next
Reply
Map
View

Click here to load this message in the networking platform