Board index » delphi » How Can I set PageSetup ?

How Can I set PageSetup ?


2004-10-29 01:20:53 AM
delphi206
I'd like to Know how Can I set PageSetup to my Active Document:
try
Word := CreateOleObject('Word.Application');
except
Application.MessageBox(Pchar('Não foi possível iniciar o Word !'), 'Informação',
MB_OK + MB_ICONINFORMATION);
Exit;
end;
Word.Visible := True;
Word.Documents.Add;
I get error if a do:
word.Selection.PageSetup.LeftMargin:= 3;
word.Selection.PageSetup.RightMargin:= 2;
word.Selection.PageSetup.TopMargin:= 2;
word.Selection.PageSetup.BottomMargin:= 1.5;
???????
 
 

Re:How Can I set PageSetup ?

<<Agnaldo:
I get error if a do:
word.Selection.PageSetup.LeftMargin:= 3;
Quote
>
You don't say what error, but margins are measured in
points so those look too small.
WordDocument.PageSetup.LeftMargin := 72;
works for me>
--
Deborah Pate (TeamB) delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
www.borland.com/newsgroups/genl_faqs.html