1declare namespace Word { 2 export interface Collection<T> { 3 count: number; 4 item(index: number): T; 5 } 6 7 export interface Font { 8 bold: boolean; 9 italic: boolean; 10 subscript: boolean; 11 superscript: boolean; 12 } 13 14 export interface Find { 15 font: Font; 16 format: boolean; 17 replacement: Replacement; 18 style: any; 19 text: string; 20 clearFormatting(): void; 21 execute( 22 findText: string, 23 matchCase: boolean, 24 matchWholeWord: boolean, 25 matchWildcards: boolean, 26 matchSoundsLike: boolean, 27 matchAllWordForms: boolean, 28 forward: boolean, 29 wrap: number, 30 format: boolean, 31 replaceWith: string, 32 replace: number): boolean; 33 } 34 35 export interface Replacement { 36 font: Font; 37 style: any; 38 text: string; 39 clearFormatting(): void; 40 } 41 42 export interface ListFormat { 43 listLevelNumber: number; 44 listString: string; 45 } 46 47 export interface Column { 48 } 49 50 export interface Columns extends Collection<Column> { 51 } 52 53 export interface Table { 54 columns: Columns; 55 } 56 57 export interface Tables extends Collection<Table> { 58 } 59 60 export interface Range { 61 find: Find; 62 listFormat: ListFormat; 63 tables: Tables; 64 text: string; 65 textRetrievalMode: { 66 includeHiddenText: boolean; 67 } 68 words: Ranges; 69 } 70 71 export interface Ranges extends Collection<Range> { 72 } 73 74 export interface Style { 75 nameLocal: string; 76 } 77 78 export interface Paragraph { 79 alignment: number; 80 range: Range; 81 style: Style; 82 next(): Paragraph; 83 } 84 85 export interface Paragraphs extends Collection<Paragraph> { 86 first: Paragraph; 87 } 88 89 export interface Field { 90 } 91 92 export interface Fields extends Collection<Field> { 93 toggleShowCodes(): void; 94 } 95 96 export interface Hyperlink { 97 address: string; 98 textToDisplay: string; 99 range: Range; 100 } 101 102 export interface Hyperlinks extends Collection<Hyperlink> { 103 } 104 105 export interface Document { 106 fields: Fields; 107 paragraphs: Paragraphs; 108 hyperlinks: Hyperlinks; 109 builtInDocumentProperties: Collection<any>; 110 close(saveChanges: boolean): void; 111 range(): Range; 112 } 113 114 export interface Documents extends Collection<Document> { 115 open(filename: string): Document; 116 } 117 118 export interface Application { 119 documents: Documents; 120 quit(): void; 121 } 122} 123