Create Word Doc Dynamically

Results 1 to 2 of 2

Thread: Create Word Doc Dynamically

  1. #1
    Join Date
    Dec 1969

    Default Create Word Doc Dynamically

    Using ASP, I would like to find a way to create a Word document dynamically by pulling text from an SQL database. Ideally, I would like to be able to specify the font and size, as well as formatting (i.e., double spacing), but this is not necessary.<BR><BR>I&#039;m assuming this is possible since you can create Excel and Access files using ASP export commands. I would appreciate if someone could point me to some Web pages offering tutorials or sample codes.<BR><BR>Additionally, once this has been made possible, I would to be able to do two things with that Word file: create a filename randomly (i.e., 87625423.doc) and then e-mail it as an attachment using ASP. Thank you.

  2. #2
    Join Date
    Dec 1969

    Default RE: Create Word Doc Dynamically

    you could do something like this:<BR><BR>Set objFSO = CreateObject("Scripting.FileSystemObject")<BR>set objFile = objFSO.CreateTextFile("D:(path to file)" )<BR><BR>This opens the file for writing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts