Create word document using ASP

deirdretwomey
deirdretwomey used Ask the Experts™
on
I'm new to ASP and i'm trying to create a word document. My form requires that users fill in a number of fields and then these should be used to create a word document. I have absolutely no idea where to start!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
I think what you want to do is this:

Dim ObjWord As Word.Application
Dim temp As String

Set ObjWord = New Word.Application
ObjWord.Documents.Open ("c:\Report.doc")
...
ObjWord.ActiveDocument.[put stuff in document]
...
ObjWord.ActiveDocument.SaveAs("c:\NewReport.doc")
ObjWord.Quit
Set ObjWord = Nothing

Look for documentation these these objects at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd10/html/woobjapplication.asp

Commented:
The samples provided previously will create a Word document on the server.  Is that what you want or you are especting that the word program will open on the client machine with the document on it.  If that is the case, you must understand that the ASP code always run on the server.  To find how to make it happen on the client side look into the javascript forum.
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Commented:
do the fields have to actually populate the word document (i.e. fields in the doc itself)?

Author

Commented:
The fields will have to fill in the word document automatically. The user will have to fill in certain fields and depending on one value they enter, they may/may not have to fill in a word document.

Author

Commented:
The fields will have to fill in the word document automatically. The user will have to fill in certain fields and depending on one value they enter, they may/may not have to fill in a word document.

Commented:
No comment has been added lately and it seems that this question have been abandoned. So it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question or invite a Moderator to close this question if there's no reply from you after seven days.

In the absence of responses, I will recommend the following:


Question PAQ'D and refund of points


** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **


Just trying to help for the cleanup...
gladxml
Question is PAQ'd and points refunded.

YensidMod
Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial