Discussion Locked

MS Word Document file format

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

A long time ago (in a galaxy ...) WordPerfect published a "Developer's ToolKit" which described in complete detail the byte-by-byte layout of a WordPerfect document (Merge Codes, Tab Sets, Indents, etc). I used this information to "Merge" data fromISAM files accessed by COBOL programs on our mainframe. Does anyone know of a reference book for Word 2000 documents that will give me this information?

I have an ODBC driver with my COBOL compiler to extract this data but I will be retrieving data from several different files and this is too complex for one SQL command.

I know I can probably create a comma delimited file from my COBOL program that contains the fields and import this into Word (I haven't persued this option yet). I would like to avoid this if possible (one less thing that a user has to remember to do).

Any help is greatly appreciated.

5 replies

by alhollmotz

Your web address was a good starting point. I couldn't find any detailed information on-line (which isn't suprising considering what I'm looking for). But I was able to e-mail MS Technical Support and they sent me a License Agreement for the file format manual.

Thankx for your help.

by ananthap

As part of VBA (Visual Basic for applications), the entire object hierarchy of word is available in MSDN.

Possibly the way to go is to program for these specs.

I myself haven't tried it but have tried (and created and updated and deleted) MS-Excel files.

Of course for this you have to have MS-Office installed.

Hope this helps.

End of mail.

by alhollmotz

I originally started using a Visual BASIC macro to extract data via the ODBC driver. This worked great for simple tasks (having the user enter a Dealer Number in a dialog box, then using SQL to extract the Dealer Name and Address, and lastly insertthe data into Mergefields in a Word document).

However, my application involves extracting many fields from many different files. VBA's SQL commands (SQL_Command and SQL_Command1) don't give me enough space to type this complex, nested SQL command.

That's why my COBOL program will read thru a "Master" Word document to create a new document, replacing Mergefield codes with live data. My program creates the new document now but when Word tries to open it, Word doesn't like it.

Thankx for your help.

This discussion is closed to new replies.