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