 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Boris Pertsov Guest
|
Posted: Wed Jan 28, 2004 12:12 pm Post subject: Word2000 new page |
|
|
Hi!
I need to open new page in the word2000 in runtime and to insert text
inside.
How ? (Example).
Please !!!
|
|
| Back to top |
|
 |
Wayne Herbert Guest
|
Posted: Wed Jan 28, 2004 3:55 pm Post subject: Re: Word2000 new page |
|
|
uses
comobj, Word2000;
var
Word : OLEVariant;
PageHeight, PageWidth : single;
Word := CreateOleObject('Word.Application');
Word.Visible := True; // Show Word
Word.Documents.Add; // Add a new Document
// if not a single view window then make it that way
if Word.ActiveWindow.View.SplitSpecial <> wdPaneNone then
Word.ActiveWindow.Panes[2].Close;
Word.ActiveWindow.View.Type := wdPrintView; // view allows accessing
headers
Word.ActiveWindow.ActivePane.View.Zoom.Percentage := 100;
Word.ActiveWindow.ActivePane.View.SeekView := wdSeekMainDocument; // set
for main document
// set the page size
Word.ActiveDocument.PageSetup.PageHeight := PageHeight; // points
Word.ActiveDocument.PageSetup.PageWidth := PageWidth;
// write out a line of text
Word.Selection.TypeText(Text := 'This is a line of text');
// advance to the next line
Word.Selection.TypeParagraph;
I've got a program that uses odd and even headers, watermarks, and special
fields in the headers. Email me if you want it.
Boris Pertsov wrote:
| Quote: | Hi!
I need to open new page in the word2000 in runtime and to insert text
inside.
How ? (Example).
Please !!!
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|