Elser

Word convertress

Very alpha Näherung of an independent
Word 6.0 Document Format specification

Copyright © 1997 by Martin Schwartz
This document is part of Laola, a distribution dealing among other things with Word 6 style documents. These are documents done with Word 6 or with Word for Windows '95 alias Word 7. This release of the specification is very first, and it is highly speculative. It is not valid for Word 8 documents. It's neither complete, nor systematically verified. It's rather buggy, strange, incomplete and it is probable that many things will be changed or at least renamed in future. Please be aware of this, when using.

If you are not familiar with Word, you might notice, that this description doesn't fit to the document you are inspecting. This is, because the "real" Word document is put into an envelope. You can retrieve the document from its envelope with Microsoft's OLE library, or by using Laola library. Laola HomePage can be found at:

      http://wwwwbs.cs.tu-berlin.de/~schwartz/pmh/index.html
or:
      http://user.cs.tu-berlin.de/~schwartz/pmh/index.html

Last but not least a note about nomenclature: though I tried to check against freely available Microsoft documents like the RTF specification, I'm afraid in many cases I've simply been lacking of time, information or I misinterpreted information. I hope the degree of confusion will be sustainable.

Comments appreciated!

Martin Schwartz


Table of Contents

  1. Data Types
  2. Word Header

  3. Anchors
  4. Character Formats
  5. Fastsave Info
  6. Field Info
  7. Font Info
  8. Footnote Info
  9. Format Codes
  10. Macro Info
  11. Paragraph Formats
  12. Paragraph Info
  13. PrinterEss Info
  14. Style Sheet
  15. Summary Information


Data Types

typeName StructureInformation
offsettype
Arrange thing(n) 00 thing
[0..n-1]
An n element array of thing.
thing( ) 00 thing
[0..]
An array of thing, where the number of elements is not known.
empty     Nothing. Takes 0 byte space.
even 00 byte
empty
0 on odd addresses.
Empty on even addresses.
This even makes an address even.
Offset blocko00wordn
fileo == n * 0x200
fileo00long Offset relative to begin of file
texto00long Offset relative to begin of text.
Equals not (!) text_begin + texto
footo00long Offset relative to begin of footnote text.
texto == text_len + footo
desto00long Offset relative to begin of destination text.
texto == text_len + foot_len + desto
String str(n) 00 char(n) A n byte long text string.
bstr 00
01
char
str(n)
n
A n byte long text string.
wstr 00
02
word
str(n)
n
A n byte long text string.
zstr 00
n
str(n)
char 0
A n byte long text string, ending with a further
zero byte.
Struct pair 00
04
fileo
long
Pointer to a structure.
Size of a structure.
struct 00 char( ) An arbitrary sized array of bytes.
 

Word Header

offsettypevalue Information
00 long word_id Word identifier
04 long word_rev Word Revision identifier
08 blocko next_doc At this offset a new word header starts. Master doc feature?
0a word doc_status Bitmask showing if document is a template, crypted and more
0c word 0x65, 0x00 unknown
0e word pw_hash Calculated from password. See program pwhash.
10 word pw_key Calculated from password. Unknown how. If one knows the crypt key, this value can be used to calculate the password. See routine get_password in word6::decrypt.pl
12 word 0 unknown
14 word 0 unknown
16 word 0 unknown
18 long text_begin Begin of first text chunk. Usually 0x300.
1c long text_end End of first text chunk.
20 long file_len Size of document in bytes.
24 long 0 unknown
28 long 0 unknown
2c long 0 unknown
30 long 0 unknown
34 long text_len Length of all text of this document. At not "fast saved" documents this often is text_end minus text_begin.
38 long foot_len Length of footnote text.
3c long dest_len Length of "destination" text.
40 long 0 unknown
44 long   (something with pair 0x080)
48 long 0 unknown
4c long   unknown
50 long 0 unknown
54 long 0 (something with pair 0x222)
58 pair stylesheet Style sheet.
60 pair stylesheet_copy Always same values as pair 0x58.
68 pair footnote_info Footnote info.
70 pair footnote_offsets Footnote offsets.
78 pair   unknown. comment_info?
80 pair   unknown, long()
88 pair section_info  
90 pair par_info  
98 pair   unknown
a0 pair   unknown
a8 pair   unknown
b0 pair dest_offsets  
b8 pair charf_block_info Offset to character format block descriptions.
c0 pair parf_block_info Offset to paragraph format block descriptions.
c8 pair   unknown
d0 pair font_info  
d8 pair field_info  
e0 pair dest_field_info  
e8 pair   unknown
f0 pair   unknown
f8 pair   unknown
100 pair anchor_names  
108 pair anchor_begin_o  
110 pair anchor_end_o  
118 pair macro_info  
120 pair   unknown
128 pair   unknown
130 pair printer_info  
138 pair printer 1  
140 pair printer 2  
148 pair   unknown
150 pair summary_info  
158 pair summary_strings  
160 pair fastsave_info  
168 pair   unknown
170 pair   unknown
178 pair   unknown. comment_info?
180 pair   unknown
188 word 0  
18a blocko charf_blocko_first First char format offset
18c blocko parf_blocko_first First par format offset
18e word charf_blocko_num Number of char format offsets
190 word parf_blocko_num Number of par format offsets
192 pair   unknown
19a pair   unknown
1a2 pair   unknown
1aa pair   unknown
1b2 pair   unknown
1ba pair   unknown
1c2 pair   unknown
1ca pair   unknown
1d2 pair   unknown. math_info?
1da pair   unknown. math_info?
1e2 pair   unknown
1ea pair   unknown
1f2 pair   unknown
1fa pair   former authresses
202 pair   unknown
20a pair   unknown
212 pair   unknown
21a pair   unknown
222 pair   unknown
22a pair   unknown
232 pair   unknown
23a pair   unknown
242 pair   unknown
242 pair   unknown
252 pair   unknown
25a pair   unknown
262 pair   unknown
26a pair   unknown
272 pair   unknown
27a pair   unknown. math_info?
282 pair   unknown. math_info?
28a pair   unknown
292 pair   unknown
29a pair history_info Former authresses and paths.
2a2 pair   unknown

0x00 longword_id
ValueInformation
0065a5dc 
0068a5dc 
0068a697 
0068a699 
00c1a5ec 

0x04 longword_rev
ValueInformation
0407c02d Word 6
0407c035 Word 6
0407c03d Word 6.0c
0409c033 Word 6
0409c03d Word 6
0409c03f Word 6
0409c041 Word 6
0409c047 Word 6
0409e057 Word 7
0409e063 Word 7
04070049 Word 8

0x0a worddoc_status
BitValueDocument Information
00TEMPLATE Is a template
01  
02FASTSAVE Is stored in "fast save" format
03 Contains graphics?
04  
05  
06  
07  
08CRYPT Has a password
09 Unicode characters?
0a  
0b  
0c  
0d  
0e  
0f  

 

Style sheet

0x58 pairstylesheet
OffsetTypeValueInformation
00wordtypeType of style sheet. Following structure is valid for type 0x0e, only. (Have Unicode documents type 0x12?)
02word unknown
04word08unknown
06word01unknown
08word4bunknown
0aword0funknown
0cword00unknown
0eword unknown
10struct( )stylesheet_entry  

stylesheet_entry
OffsetTypeValueInformation
00wordsizeSize of entry -2. Value zero means, that this entry is not available. Rest of this entry then is missing.
02bytestyle_id Style ID. 0xfe for styles defined by userEss.
03byteclass class & 0x0f == 0: standard style
class & 0x0f == 0xf: userEss style
class & 0xf0: unknown
04wordprevstyle bits 00..03: gender
1==paragraph, 2==character
bits 04..11: number of prev style
bits 12..15: state
0==valid, 0xf==invalid
06wordnextstyle bits 00..03: antigender
1==character, 2==paragraph
bits 04..11:
paragraphs: number of next style
characters: this style's number
bits 12..15: state
always 0
08wordsize Same as at offset 00.
0abstrname Name of style.
 even   
xxstructstylesheet par_entry Paragraph format entry. See below. Only, if gender & 1.
 even   
yystructstylesheet char_entry Character format entry. See below. Always.

stylesheet_par_entry
OffsetTypeValueInformation
00wordsize Size of following data.
02wordstyle_num Style number.
04str(size-2)format Paragraph format string.

stylesheet_char_entry
OffsetTypeValueInformation
00wstrformat Character format string.

 

style_idInformation
Num Type (english)ID (deutsch) 
00Normal Standard  
01Heading 1 Überschrift 1  
02Heading 2 Überschrift 2  
03Heading 3 Überschrift 3  
04Heading 4 Überschrift 4  
05Heading 5 Überschrift 5  
06Heading 6 Überschrift 6  
07Heading 7 Überschrift 7  
08Heading 8 Überschrift 8  
09Heading 9 Überschrift 9  
0aIndex 1 Index 1  
0bIndex 2 Index 2  
0cIndex 3 Index 3  
0dIndex 4 Index 4  
0eIndex 5 Index 5  
0fIndex 6 Index 6  
10Index 7 Index 7  
11Index 8 Index 8  
12Index 9 Index 9  
13TOC 1 Verzeichnis 1  
14TOC 2 Verzeichnis 2  
15TOC 3 Verzeichnis 3  
16TOC 4 Verzeichnis 4  
17TOC 5 Verzeichnis 5  
18TOC 6 Verzeichnis 6  
19TOC 7 Verzeichnis 7  
1aTOC 8 Verzeichnis 8  
1bTOC 9 Verzeichnis 9  
1cNormal Indent Standardeinzug  
1dFootnote Text Fußnotentext  
1eAnnotation Text Anmerkungstext  
1fHeader Kopfzeile  
20Footer Fußzeile  
21Index Heading Indexüberschrift  
22Caption Beschriftung  
23  Abbildungsverzeichnis  
24  Absenderadresse  
25  Umschlagadresse  
26Footnote Reference Fußnotenzeichen  
27Annotation Reference Anmerkungszeichen  
28Line Number Zeilennummer  
29Page Number Seitenzahl  
2aEndnote Reference Endnotenzeichen  
2bEndnote Text Endnotentext  
2c  Zusatz 2  
2d  Makrotext  
2e  Zusatz 1  
2fList Liste  
30List Bullet,UL Aufzählungszeichen,UL  
31List Bullet,OL Listennummer,OL  
32List 2 Liste 2  
33List 3 Liste 3  
34List 4 Liste 4  
35List 5 Liste 5  
36List Bullet 2 Aufzählungszeichen 2  
37List Bullet 3 Aufzählungszeichen 3  
38List Bullet 4 Aufzählungszeichen 4  
39List Bullet 5 Aufzählungszeichen 5  
3aList Number 2 Listennummer 2  
3bList Number 3 Listennummer 3  
3cList Number 4 Listennummer 4  
3dList Number 5 Listennummer 5  
3eTitle Titel  
3f  Grußformel  
40  Unterschrift  
41Default Paragraph Font Absatz-Standardschriftart  
42Body Text Textkörper  
43  Textkörper-Einzug  
44  Listenfortsetzung  
45  Listenfortsetzung 2  
46  Listenfortsetzung 3  
47  Listenfortsetzung 4  
48  Listenfortsetzung 5  
49  Nachrichtenkopf  
4aSubtitle Untertitel  

 

Footnote Info

The footnote texts are stored regularly in the text section.

0x68 pairfootnote_info
OffsetTypeValueInformation
00texto(n+1)anchor Offset to footnotes anchor. This is, where the footnote mark will be. n = (size-4)/6
xxword(n)number Number of footnote.
 

0x70 pairfootnote_offsets
OffsetTypeValueInformation
00footo(n)offset Offset to footnotes text. n=size/4

 

Section Info

0x88 pairsection_info
OffsetTypeValueInformation
00texto(n+1) offset  
xxstruct(n) section_info_entry  

section_info_entry
OffsetTypeValueInformation
00 word    
02 fileo section_entry  
06 word    
08 long    

section_entry
OffsetTypeValueInformation
00 wstr secf format

 

Paragraph Info

0x90 pairpar_info
OffsetTypeValueInformation
00texto(n+1)offset Offset to paragraph
xxstruct(n)par_info_entry  

par_info_entry
OffsetTypeValueInformation
00 word   unknown
02 word style Style number of paragraph

 

Destinations

0xb0 pairdest_o
OffsetTypeValueInformation
00desto( )    

 

Character Formats

0xb8 paircharf_block_info
If charf_blocko_num equals not n, this table here is invalid. Then char format blockos are charf_blocko_num consequent blockos starting with blocko number charf_blocko_first. (See Header -> 0x18a, 0x18e)
OffsetTypeValueInformation
00texto(n+1)   First offset of character format blocko #i.
xxblocko(n)   Character format offsets.

charf_block
OffsetTypeValueInformation
00 fileo(n+1) text_o Offset to text.
xx struct(n) charf_info  
yy struct(n) charf_style yy[i] = fod_o[i] ?
fod_o*2 : default;
1ffbyte n  

charf_info
OffsetTypeValueInformation
00 byte fod_offset  

charf_style
OffsetTypeValueInformation
00 bstr format Character format string.
See format codes.

 

Paragraph Formats

0xc0 pairparf_block_info
If parf_blocko_num equals not n, this table here is invalid. Then paragraph format blockos are parf_blocko_num consequent blockos starting with blocko number parf_blocko_first. (See Header -> 0x18c, 0x190)
OffsetTypeValueInformation
00texto (n+1)   First offset of paragraph format blocko #i.
xxblocko (n) parf_blocko Offsets to paragraph format blocks.

parf_block
OffsetTypeValueInformation
00 fileo (n+1) text_o Offset to text.
xx struct (n) parf_entry  
yy struct (n) parf_style  
1ffbyte n  

parf_entry
OffsetTypeValueInformation
00 byte 0 default style
style_o according parf_style has offset style_o*2
01 struct parf_info  

parf_info
OffsetTypeValueInformation
00 byte (6)   unknown

parf_style
OffsetTypeValueInformation
00 byte l Size of following data in words(!)
01 word parf_style_num Paragraph style number. Refers to stylesheet_par_entry.style_num?
03 str(2*l-2) format Paragraph format codes.
See format codes.

 

Format . Codes

Units
  twip point inch cm
1 twip = 1 1/20 1/1440 0.00176
1 point = 20 1 1/72 0.03528
1 inch = 1440 72 1 2.54
1 cm = 566.9 28.34 0.3937 1

Format Types
Format typeOffsetTypeValueInformation
.thing 00byteID 
01thingA thing with id ID. 
distance00wordn A distance of n twips.
option00byte0,1,2,... 
switch00byte0,10=off, 1=on

Format Codes
IDOffsetsTypeValueEnglishDeutsch
00 00 byte 0 unknown  
02 00 .word   unknown  
05 00 .option type Paragraph alignment Absatz Ausrichtung
07 00 .switch     Zeilen nicht trennen
08 00 .switch     Absätze nicht trennen
09 00 .switch     Seitenwechsel oberhalb
0c 00 .byte size unknown  
02 byte(size)   unknown  
0d 00 .option   unknown  
0e 00 .switch     Zeilennummern unterdrücken
0f 00 .word size Tabulator definition, size of following structure  
03 byte n    
04 byte 0x53    
05 distance
(n)
pos   Tabulatorpositionen
xx word(n) type   Tabulatortypen
10 00 .distance n   Einzug rechts
11 00 .distance n   Einzug links
13 00 .distance n   Einzug erste Zeile
14 00 .distance n   Zeilenabstand.
n>0: mindestens n
n<0: genau -n
03 switch     off==einfach
on==mehrfach
15 00 .distance n   Abstand vor
16 00 .distance n   Abstand nach
18 00 .switch   New table cell Neue Tabellenspalte
19 00 .switch   New table row Neue Tabellenreihe
1b 00 .distance   unknown  
1c 00 .word   unknown  
1d 00 .byte   unknown  
2c 00 .switch     Silbentrennung aus
33 00 .switch     Absatzkontrolle (1)
44 00 byte 0x44   Einfügen?
01
02
byte
fileo
4
ptr
 
 
Something?
Ptr to something?
4a 00 .byte(4)   unknown  
50 00 .word style_num Select character style style_num  
55 00 .switch   bold fett
56 00 .switch   italic kursiv
57 00 .switch   strike through durchgestrichen
5a 00 .switch   small caps Kapitälchen
5b 00 .switch   capitals Großbuchstaben
5c 00 .switch   hidden verborgen
5d 00 .word n Font #n Zeichensatz #n
5e 00 .switch   underline unterstrichen
60 00 .distance n   Laufweite
n>0: sperren um n
n<0: schmälern um -n
61 00 .distance   unknown  
62 00 .option color Foreground Color #color  
63 00 .word n   Zeichensatz mit
n/2 Punkte Größe
65 00 .word n   n>0: n/2 Punkte höherstellen
n<0: -n/2 Punkte tieferstellen
67 00 .option   unknown  
68 00 .option 0,1,2   0==normal
1==hochgestellt
2==tiefgestellt
6b 00 .word n   n>0: unterschneiden ab n/2 Punkte
n<0: -n/2 Punkte ?
75 00 .switch   End of text section mark  
88 00 .byte n   Spaltennummer {0..}
02 distance width   Spaltenbreite
89 00 .byte n   Spaltennummer {0..}
02 distance dist   Spaltenabstand
8a 00 .switch   unknown  
8e 00 .option   unknown  
90 00 .distance   unknown  
99 00 .switch   unknown  
9e 00 .switch     Linie zwischen Spalten
a4 00 .distance     Seitenbreite?
a5 00 .distance     Seitenhöhe?
b4 00 .byte   unknown  
b6 00 .word   unknown  
b8 00 .distance     Halber Abstand zwischen zwei Zellen
b9 00 .switch     Kein Seitenwechsel in Zeile?
ba 00 .byte   unknown  
bb00 .struct rborder Border definition for a whole table row.  
bd 00 .distance   Height of one table row. Höhe einer Tabellenreihe.
be 00 .byte size   Table definition, size of following structure. If size is not enough for this structure, missing data will be assumed to have value zero.
02 byte 0 unknown  
03 byte n    
4 distance
(n+1)
pos   Position der horizontalen Tabellenstege
xx struct(n) cborder n border definitions for n cells.  
bf 00 .byte size Table definition, size of following structure  
02 distance
(size/2)
width   Breite der Tabellenzellen?
c0 00 .word   unknown  

Paragraph alignment
Value English Deutsch
0x00 left links
0x01 center zentriert
0x02 right rechts
0x03 justify block

Tabulator types
Value English Deutsch
0x00 left Links
0x01 right Rechts
0x02 decimal Dezimal
0x03 vertical line Vertikale Linie
0x04 dots Punkte
0x08 hyphens Kleine Striche
0x10 line Linie

Standard Colors?
ValueEnglishDeutsch
0x00   ?
0x01   schwarz
0x02   hellblau
0x03   helltürkis
0x04   hellgrün
0x05   hellviolett
0x06   hellrot
0x07   gelb
0x08   weiß
0x09   blau
0x0a   türkis
0x0b   grün
0x0c   violett
0x0d   rot
0x0e   braun
0x0f   grau
0x10   grau

Border Definition For One Cell
OffsetTypeValueInformation
00   0 unknown
02 distance top Thickness of top line.
04 distance left  
06 distance bottom  
08 distance right  

Border Definition For A Whole Table Row
OffsetTypeValueInformation
00 distance outer_top? Thickness of line?
02 distance outer_left?  
04 distance outer_bottom?  
06 distance outer_right?  
08 distance inner_horizontal?  
0a distance inner_vertical?  

 

Font Info

0xd0 pairfont_info
OffsetTypeValueInformation
00wordsizeSize of structure.
02struct( )font_entry 

font_entry
OffsetTypeValueInformation
00 byte size Size of following structure.
01 byte family Font family.
02 byte   unknown
03 byte   unknown
04 byte charset Character set identifier.
05 byte altname_o Offset to alternative font name.
06 zstr name Name of font
06 + altname_o empty    
zstr altname Alternative font name.

Font Family
BitsValueInformation
0..100Default pitch
01Fixed pitch
02Variable pitch
2..3 unknown
4..700nil, unknown or default
10Roman
20Swiss
30Modern
40Script
50Decor
other?

Font Character Sets
ValueInformation
00ANSI
02SYMBOL
80SHIFTJIS
88unknown
a1GREEK
a2TURKISH
b1HEBREW
b2ARABICSIMPLIFIED
b3ARABICTRADITIONAL
b4ARABICUSER
b5HEBREWUSER
ccCYRILLIC
eeEASTERNEUROPE
fePC437
ffOEM

 

Field Info

0xd8 pairfield_info
OffsetTypeValueInformation
00 texto(n+1)   Offset to field mark. The first byte at offset equals to the value of the ID byte of the according struct. If ID of the next field mark is less or equal to current ID, between offset+1 of the current field mark and the offset of the following field mark stands a text.
xx struct(n) field_cmd Command token. s.b.
field_name Defined by system or userEss
field_end unknown

0xe0 pairdest_field_info
OffsetTypeValueInformation
00 desto(n+1)   Like field_info. Offsets here don't refer to body text, but to destination text.
xx struct(n) field_cmd Command token. s.b.
field_name Defined by system or userEss
field_end unknown

field_cmd
OffsetTypeValueInformation
00 byte 0x13 ID
01 byte code  

field_name
OffsetTypeValueInformation
00 byte 0x14
0x94
ID
01 byte 0xff unknown

field_end
OffsetTypeValueInformation
00 byte 0x15
0x95
ID
01 byte 0x40
0x80
0xc0
unknown

Field Codes
ValueEnglishDeutschParameter example
03 REF REF Figure1
06 SET BESTIMMEN  
07 IF WENN  
08 INDEX INDEX \c "2"
0a STYLEREF FVREF "Gliederung 1"
0c SEQ SEQ  
0d TOC VERZEICHNIS \o "1-3"
0e INFO INFO  
0f TITLE TITEL  
10 SUBJECT THEMA  
11 AUTHOR AUTOR  
12 KEYWORDS SCHLÜSSEL  
13 COMMENTS KOMMENTAR  
14 LASTSAVEDBY GESPEICHERTVON  
15 CREATEDATE ERSTELLDAT  
16 SAVEDATE SPEICHERDAT  
17 PRINTDATE DRUCKDAT  
18 REVNUM ÜBERARBEITUNGSNUMMER  
1a NUMPAGES ANZSEITEN  
1b NUMWORDS ANZWÖRTER  
1c NUMCHARS ANZZEICHEN  
1d FILENAME DATEINAME  
1e TEMPLATE DOKVORLAGE  
1f DATE AKTUALDAT  
20 TIME ZEIT \@ "tt.MM.jjjj"
21 PAGE SEITE 3
22 = =  
23 QUOTE ANGEBEN  
25 PAGEREF SEITENREF  
26 ASK FRAGE  
27 FILLIN EINGEBEN  
29 NEXT NÄCHSTER  
2a NEXTIF NWENN  
2b   ÜBERSPRINGEN  
2c MERGEREC DATENSATZ  
30 PRINT DRUCK  
31 EQ FORMEL  
32 GOTOBUTTON GEHEZU  
33 MACROBUTTON MAKROSCHALTFLÄCHE  
34 AUTONUMOUT AUTONRGLI  
35 AUTONUMLGL AUTONRDEZ  
36 AUTONUM AUTONR  
37   IMPORT  
38 LINK VERKNÜPFUNG  
39 SYMBOL SONDZEICHEN 224 \f "Wingdings" \s 10
3a EMBED EINBETTEN Paint.Picture Object1
3b MERGEFIELD SERIENDRUCKFELD  
3c USERNAME BENUTZERNAME  
3d USERINITIALS BENUTZERINITIALEN  
3e USERADDRESS BENUTZERADR  
41 SECTION ABSCHNITT  
42 SECTIONPAGES ABSCHNITTSEITEN  
43 INCLUDEPICTURE EINFÜGENGRAFIK C:\\WORD\\BILD
44 INCLUDETEXT EINFÜGENTEXT  
45 FILESIZE DATEIGRÖSSE  
46   FORMULARTEXT  
47 FORMCHECKBOX FORMULARKONTROLLFELD  
48 NOTEREF FUSSENDNOTEREF  
4b MERGESEQ SERIENDRUCKSEQ  
4e DATABASE DATENBANK  
4f AUTOTEXT AUTOTEXT  
50 COMPARE VERGLEICH  
53   FORMULARDROPDOWN  
54 ADVANCE VERSETZEN  

 

Anchors

0x100 pairanchor_names
00 word size Size of structure.
02 bstr( ) Names Anchor names.

0x108 pairanchor_begin_o
00 texto(n+1) begin Anchor begin offset.
xx long(n) index Anchor end index.
Refers to anch_end_o.

0x110 pairanchor_end_o
00 texto( ) end Anchor end offset.

 

Macro Info

Note: A lot of information I did not yet understand fully or I simply found no time to include it into this specification. Nevertheless a glance into "word6/macrolib.pl" might give you further hints. Especially it could explain to you, how the macro code itself is structured.

0x118 pairmacro_info
OffsetTypeValueInformation
00byte0xffStart ID
01struct( )empty 
macro_info 
menu_info 
macro_extnames 
macro_intnames 
other_infounknown
xxbyte0x40End ID

macro_info
OffsetTypeValueInformation
00 byte 01 Macro Info ID
01 word n Number of entries
03 struct(n) macro_info_entry  

macro_info_entry
OffsetTypeValueInformation
00 byte version Version of WordBasic?
01 byte key XOR mask used on macro text
02 word intname_i "internal name", index on macro_intnames.
04 word extname_i "external name", raw index on macro_extnames. Index is yielded by taking the index of the ordered list of extname_i, xname_i and menu_entry->extname_i. Value 0xffff means: not defined.
06 word xname_i raw index on macro_extnames
08 long   unknown
0c long code_len length of macro text
10 long code_state State of macro?
14 fileo code Offset to macro text

menu_info
OffsetTypeValueInformation
00 byte 05 Menu Info ID
01 word n Number of entries
03 struct (n) menu_info_entry  

menu_info_entry
OffsetTypeValueInformation
00 word context Context of menu entry. (To be explained)
02 word menu Menu number. Says in which menu the entry shall be available.
04 word extname_i "external name", raw index on macro_extnames
06 word uk Unknow value. Always 2?
08 word intname_i index on macro_intnames.
10 word pos Menu position of menu entry.

macro_extnames
OffsetTypeValueInformation
00 byte 0x10 External Names ID
01 word size Size of entry
03 struct( ) macro_extnames_entry  

macro_extnames_entry
OffsetTypeValueInformation
00 bstr string External names and macro descriptions.
xx word numref Counts, how often this entry is referred to.

macro_intnames
OffsetTypeValueInformation
00 byte 0x11 Internal Names ID
01 word n Number of entries.
03 struct (n) macro_intnames_entry  

macro_intnames_entry
OffsetTypeValueInformation
00 word index Number to identify this entry.
02 bstr name Name string.
xx byte   unknown

 

PrinterEss Info

0x130 pairprinter_info
OffsetTypeValueInformation
00zstrnameName of printer?
xxzstrconnectionPrinter connection?
yyzstrdriverPrinter driver?

 

Summary Information

0x150 pairsummary_info
OffsetTypeValueInformation
14long create_dtm  
18long lastsave_dtm  
1clong lastprinted_dtm  
20word revision  
22long    
26long wordcount  
2along charcount  
2eword pagecount  
30long   (docsuminfo->6)
34word    
36word    
38long   (docsuminfo->5)
3clong    
40long    
44word    
54long   Word 7 only.

0x158 pairsummary_strings
OffsetTypeValueInformation
00word size Size of structure.
02byte 0 unknown
03byte 0 unknown
04bstr template  
xxbstr keywords  
xxbstr short  
xxbstr comments  
xxbstr authress  
xxbstr previous authress  

 

Fast Save Information

0x160 pairfastsave_info
OffsetTypeValueInformation
00struct( ) fastsave_empty 
fastsave_charf 
fastsave_parf 

fastsave_empty
OffsetTypeValueInformation
00 byte 0 id
01 byte   unknown

fastsave_charf
OffsetTypeValueInformation
00 byte 1 id
01 word len len of char format style
03 str(len) charf char format style

fastsave_parf
OffsetTypeValueInformation
00 byte 2  
01 word len  
03 word   unknown
05 texto(n)    
xx struct(n-1) fastsave_parf_entry 

fastsave_parf_entry
OffsetTypeValueInformation
00 word    
02 fileo    
06 word n if odd n:
fastsave_charf index = (n-1)/2

 

Document History Information

0x29a pairhistory_info
OffsetTypeValueInformation
00word size Size of this structure in bytes.
02struct( )history_entry  

history_entry
OffsetTypeValueInformation
00 bstr authress  
n+1 bstr path  

 


Back to Laola homepage.