![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Set page break in Word document
This example shows, how to create new Word document with two pages. Don't forget to add ComObj in uses chapter.
uses ComObj;
...
procedure TForm1.Button1Click(Sender: TObject);
var
Word: OleVariant;
PageBreak: Integer;
begin
Word:=CreateOleObject('Word.Application');
Word.WordBasic.FileNew;
Word.WordBasic.Insert('page1');
PageBreak:=1;
Word.Selection.InsertBreak(PageBreak);
Word.WordBasic.Insert('page2');
Word.Visible:=True;
end;
-
More for developers