Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP, Word & SQL 7
Message
De
15/02/2001 16:10:11
Jacci Adams
Lindsay-Adams Consulting
Louisville, Ohio, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
ASP, Word & SQL 7
Divers
Thread ID:
00476470
Message ID:
00476470
Vues:
63
Hi All,

I've been asked by my husband to post this question. He is a project manager and doesn't usually get involved in the actual programming side, but he needs a little help.

He is trying to use ASP to create a web page that will allow the user to click on a button on the page to produce a Word document from a SQL 7 data source.

Could someone point me to some sample ASP code that will get him started. I can do this quite easily with VFP and Word. I looked at the ASP book he brought home, told him how to create the object variable to connect to Word, then handed him the Granor/Martin book. He said he couldn't get it to work. I didn't get a chance to look at the code he created. Is the ASP syntax that much different than VFP? Is there something that needs to be setup that we are missing?

I would imagine something like this would work:
In between script and endscript (can't use html tags in messages)
set oWord = CreateObject("Word.Application")
set oDocument = oWord.Documents.Add()
set oRange = oDocument.Range()
oRange.InsertAfter("This is a test"+ CHR(13))
oRange.InsertAfter("This is data from SQL Server"+ sql server data)
oWord.ActiveDocument.SaveAs("myfilename")
TIA,
Jacci
Répondre
Fil
Voir

Click here to load this message in the networking platform