Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WORD

Status
Not open for further replies.

minoad

Programmer
Joined
Mar 28, 2001
Messages
138
Location
US
I am attempting to create an asp page that will open up a word document, and fill it with fields from a database. I have done this in IE, but the boss wants it to occur in Word '97. Can someone point me in the correct direction?

Micah A. Norman

mnorman1@mediaone.net
 
I suppose it is oke for you to create an ASCII file with the correct input? That's easy:

dim fs, textFile
Set fs=Server.CreateObject( "Scripting.FileSystemObject" )
Set textFile = fs.CreateTextFile( "YourFilename.txt" )

' write some text
textfile.write "REPORT"
do while not rs.EOF
' write a field
textfile.write rs(0)
rs.MoveNext
Loop
textFile.Close

For layout stuff i use 2 tricks:
o Create special markers in the text, which i use with a Word macro (after opening the TXT file, i run the macro for fancy things)
o This way you can create a HTML file! An then you can use tags for layout.






br
Gerard
(-:

| Do it!
|
V
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top