How to implement the setting of the Word document header in Delphi5?

xiaoxiao2021-03-05  21

I have a set code for the current page.

VAR

MMM, NNN, AAA: Olevariant;

Begin

mmm: = wdLine; nnn: = 1; aaa: = wdFieldPage; WordApp.ActiveWindow.ActivePane.View.SeekView: = wdSeekCurrentPageHeader; WordApp.Selection.Move (mmm, nnn); WordApp.Selection.ParagraphFormat.Alignment: = wdAlignParagraphCenter;

Wordapp.selection.insertafter ('first'); mmm: = WDCharacter; Wordapp.Selection.move (MMM, NNN); Wordapp.Selection.RANGELDS.ADD (Wordapp.Selection.Range, AAA, MMM, NNN); AAA: = WordApp.Selection.Insertafter ('page / first'); Wordapp.Selection.Move (MMM, NNN); Wordapp.selection.fields.add (Wordapp.Serection.Range, AAA, MMM, NNN);

Wordapp.Selection.InsertAfter ('page'); WordApp.activeWindow.ActivePane.View.seekview: = wdseekmainDocument;

END;

However, only the first page, how to modify the header of the page behind?

转载请注明原文地址:https://www.9cbs.com/read-38138.html

New Post(0)