Hi, I have been trying to find information, to no avail, on creating and saving a Word.doc that got it's information from a recordset in an ASP page. Basically, the ASP creates the ADO recordset and the recordset is passed to a page that develops a Word Doc on the fly, basically a report that can be saved to the "C" drive and printed or e-mailed. Kinda wanna do this behind the scene. User clicks a save button and Wala it's saved on the hard drive.
Can someone suggest where I might find this info? Or guide me in a basic design from which I can build?
Comments
I have written several pages in asp and programs in delphi that use an OLE object to create/modify excel sheets, but word can be controlled in exactaly the same way.
do a search for OLE automation MSDN.microsoft.com has the full word object which will be a lot of help as well.
Sorry I don't have any source code handy that I can send you. I'll write up a tutorial when I have a free afternoon (don't hold your breath waiting)
: Hi, I have been trying to find information, to no avail, on creating and saving a Word.doc that got it's information from a recordset in an ASP page. Basically, the ASP creates the ADO recordset and the recordset is passed to a page that develops a Word Doc on the fly, basically a report that can be saved to the "C" drive and printed or e-mailed. Kinda wanna do this behind the scene. User clicks a save button and Wala it's saved on the hard drive.
: Can someone suggest where I might find this info? Or guide me in a basic design from which I can build?
:
:
Thank you.
: Thank you.
:
:In the end I decide to rewrite the entire procedure> I used "Response.Write("" & rs1("LName") & "")".
This way it hard codes the data to an HTML page dynamically. I then used javascript to invoke the Saveas dialog box
"document.execCommand("SaveAs",true,"30DaysHoldReport.htm");" allowing the user to save the html page to their harddrive. When it's reproduced they get all the data on an html page. They can e-mail it, print it, whatever. They still dont know from whence it came.
Hope this helps someone.
1. Use the FileSystemObject to write ALL file information on your c drive (i.e. where your documents saved) to your DB;
2. Retrieve ALL saved data from your DB, and display them in a table with asp/html;
3. You need to set up some security rules to protect your files on saved on your c drive; and,
4. When click on the <%=rs("documentname")%>, the Word document get opened.
It took me 6 months to build this project for 4000+ users in a company wide.
http://visualbasic.about.com/library/weekly/aa020401a.htm
-Bagles1
: Hi, I have been trying to find information, to no avail, on creating and saving a Word.doc that got it's information from a recordset in an ASP page. Basically, the ASP creates the ADO recordset and the recordset is passed to a page that develops a Word Doc on the fly, basically a report that can be saved to the "C" drive and printed or e-mailed. Kinda wanna do this behind the scene. User clicks a save button and Wala it's saved on the hard drive.
: Can someone suggest where I might find this info? Or guide me in a basic design from which I can build?
:
:
I used to create Word documents with the help of some 3rd party SDKs. I think it is a convenmient way. Btw, do you have any good recommendations about the related Word creating Toolkit? Thanks in advance.
Best regards,
Arron