Home |
Search |
Today's Posts |
#1
|
|||
|
|||
internal format of a word document
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. |
#2
|
|||
|
|||
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. -- Margaret Aldis - Microsoft Word MVP Syntagma partnership site: http://www.syntagma.co.uk Word MVP FAQ site: http://www.word.mvps.org "yarders" wrote in message ... 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. |
#3
|
|||
|
|||
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/de...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. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Margaret Aldis wrote: 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. "yarders" wrote in message ... 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Please give us REVEAL CODES like WORD PERFECT not reveal codes in. | Microsoft Word Help | |||
Envelope Address | New Users | |||
letters - ask/fillin | New Users | |||
WP Delay Code - Word Equiv | Microsoft Word Help | |||
How to change merge forms from Word Perfect to Microsoft Word | Microsoft Word Help |