Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP Question
Message
De
17/02/2001 22:08:42
Jacci Adams
Lindsay-Adams Consulting
Louisville, Ohio, États-Unis
 
 
À
17/02/2001 14:22:09
Bob Lucas
The WordWare Agency
Alberta, Canada
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00477015
Message ID:
00477080
Vues:
35
Hi Bob,

Thanks! I'll pass this along to him.

Jacci

>The code you posted looks reasonable. Presumably you have the bracket % before the code starts and % bracket afterwards.
>
>Once the document has been created and saved on the web server (which may be harder than you think because of permissions for the IUSER_MACHINE account,
>you can simply do a
>Response.Redirect(lcFilename)
>
>lcfilename should have the complete physical path.
>
>Depending on the user machine, this will cause either a download dialog or word to open in the browser.
>
>
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform