internal format of a word document

Y

yarders

How do you find out the internal format? The reason for this is that I'm
trying to manipulate a word document from VB6 code and after it's manipulated
the size of the file could change.

After saving the changes can't open the file, a message box is shown stating
the name or path are not valid. I believe it's because the file size has
changed.

Any help with this will be greatly apprieciated, thanks.
 
M

Margaret Aldis

The internal format is a deep, dark (and probably shameful) secret ;-)

You can't directly manipulate the file format - certainly any change to
number of characters etc. will render the file completely unreadable
(because the pointers Word uses for all its formatting etc. won't point to
the right place any more.) Instead, you need to use VBA to manipulate the
document object structure. There are several Word VBA newsgroups where you
can get more help on specifics.
 
J

Jay Freedman

The format isn't really deep, dark, or secret, although I won't argue about
the shameful part. :) The documentation is on MSDN, starting at
http://msdn.microsoft.com/library/d...-us/stg/stg/structured_storage_start_page.asp.
There are other resources on the Internet; search Google for "OLE structured
storage".

If you want to manipulate a Word file without involving Word, you have a LOT
to learn about OLE, COM, and other three-letter acronyms. I figure a year of
study ought to get you started. Also be aware that most of the available
sample code is in C++, not VB6.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top