BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WORD formatting

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
George Kuascha
Guest





PostPosted: Sat Dec 20, 2003 4:48 pm    Post subject: WORD formatting Reply with quote



What is the code for changing from one font to another font?
What is the code for centering text?


Back to top
Deborah Pate (TeamB)
Guest





PostPosted: Sun Dec 21, 2003 2:09 pm    Post subject: Re: WORD formatting Reply with quote



< What is the code for changing from one font to another
font?
What is the code for centering text?
Quote:


var
WFont: _Font;
...
WFont := Doc.Paragraphs.Item(2).Range.Font;
WFont.Name := 'Arial';
WFont.Color := clRed;
WFont.Size := 14;

Doc.Paragraphs.Alignment := wdAlignParagraphCenter;

--
Deborah Pate (TeamB) http://delphi-jedi.org

TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html



Back to top
George Kuascha
Guest





PostPosted: Mon Dec 22, 2003 1:15 am    Post subject: Re: WORD formatting Reply with quote



I need to center only one line and the rest are left justified. The
following code does not do this. There is something here I'm not
understanding.

WordDocument1.Paragraphs.Alignment:= wdAlignParagraphCenter;
WordDocument1.Range.InsertAfter(ProcMemo.Lines.Strings[0]+#13#10);
WordDocument1.Range.InsertParagraphAfter;
WordDocument1.Paragraphs.Alignment:= wdAlignParagraphLeft;

What is the code for aligning only a single line or row? The following code
does not work.

WordDocument1.Paragraphs.Last.Range.Rows.Alignment:= wdAlignRowCenter;

Thanks

"Deborah Pate (TeamB)" <d.pate (AT) blueyonder (DOT) co.not-this-bit.uk> wrote in
message news:VA.00001e02.098f6b9c (AT) blueyonder (DOT) co.not-this-bit.uk...
Quote:
George Kuascha:
What is the code for changing from one font to another
font?
What is the code for centering text?


var
WFont: _Font;
..
WFont := Doc.Paragraphs.Item(2).Range.Font;
WFont.Name := 'Arial';
WFont.Color := clRed;
WFont.Size := 14;

Doc.Paragraphs.Alignment := wdAlignParagraphCenter;

--
Deborah Pate (TeamB) http://delphi-jedi.org

TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html





Back to top
Deborah Pate (TeamB)
Guest





PostPosted: Fri Jan 09, 2004 7:37 pm    Post subject: Re: WORD formatting Reply with quote

< WordDocument1.Paragraphs.Last.Range.Rows.Alignment:=
wdAlignRowCenter;
Quote:


WordDocument1.Paragraphs.Last.Alignment:=
wdAlignRowCenter;


--
Deborah Pate (TeamB) http://delphi-jedi.org

TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.