Board index » delphi » adding to MS Word Header
Martin Hayes
Delphi Developer |
adding to MS Word Header2004-11-26 07:55:07 PM delphi148 Hi all, I am having real trouble getting delphi to insert some text into the header of a word doc !! Any Ideas ??? I have opened the Word doc using this 'code------------------------------------------ word := CreateOleObject('Word.Application'); try word.Documents.Open(FileName := 'c:\aaa.doc', PasswordDocument := 'qwerty'); '------added text using this word.selection.typetext('hello') '-------printed it word.ActiveDocument.PrintOut; word.Quit; finally word := UnAssigned; end; This all works fine but i just cant get it to write to the header section. any help would be fantastic !!!!!! Thanks Martin Hayes |