Board index » delphi » Sending data to word

Sending data to word


2004-07-22 07:58:46 AM
delphi197
Hi:
I want to send data to word. that is ok. Where I can find a complete list of
command to create a document?
i.e: I create a document:
...
VarWord := CreateObject('Word.Basic');
// now I change to bold font
VarWord.Bold;
..
etc
Now I want to set complete justify to text. How I can do it?
Any help will be appreciate.
and i sorry by my english!
Regards
Luis Taballione
 
 

Re:Sending data to word

For an excellent introduction to Word automation, see Deborah Pate's tutorials
at:
www.djpate.freeserve.co.uk/Automation.htm
Within that site you can download a more comples sample program I wrote which
sets margins, creates headers, uses different styles, etc.
www.djpate.freeserve.co.uk/delphiworddemo.zip
Luis Daniel Taballione writes:
Quote
Hi:
I want to send data to word. that is ok. Where I can find a complete list of
command to create a document?
i.e: I create a document:
...
VarWord := CreateObject('Word.Basic');
// now I change to bold font
VarWord.Bold;
..
etc
Now I want to set complete justify to text. How I can do it?
Any help will be appreciate.
and i sorry by my english!
Regards
Luis Taballione
 

Re:Sending data to word

Thank Wayne!
All Ok. This is my routine:
procedure TDtEmpresasForm.BitBtn10Click(Sender: TObject);
var
FWordApplication: _Application;
VarW: Variant;
begin
//create Word Application component
FWordApplication := CoWordApplication.Create;
//make Word visible
FWordApplication.Visible := True;
//create a new/empty document.
//EmptyParams mean omit/ignore Document.Add params
FWordApplication.Documents.Add(EmptyParam,EmptyParam);
//insert some words into the new document in Bold style
FWordApplication.Selection.Font.Set_Bold(Integer(True));
FWordApplication.Selection.TypeText ('Hello World!!!');
I only need is set my alignment to Justify
Luis
"Wayne Herbert" <XXXX@XXXXX.COM>writes
Quote
For an excellent introduction to Word automation, see Deborah Pate's
tutorials
at:

www.djpate.freeserve.co.uk/Automation.htm

Within that site you can download a more comples sample program I wrote
which
sets margins, creates headers, uses different styles, etc.

www.djpate.freeserve.co.uk/delphiworddemo.zip

Luis Daniel Taballione writes:

>Hi:
>I want to send data to word. that is ok. Where I can find a complete list
of
>command to create a document?
>i.e: I create a document:
>...
>VarWord := CreateObject('Word.Basic');
>// now I change to bold font
>VarWord.Bold;
>..
>etc
>Now I want to set complete justify to text. How I can do it?
>Any help will be appreciate.
>and i sorry by my english!
>Regards
>Luis Taballione

 

Re:Sending data to word

<<Luis Daniel Taballione:
I only need is set my alignment to Justify
Quote
>
Word.Selection.Paragraphs.Alignment := wdAlignParagraphJustify;
--
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
 

Re:Sending data to word

Thanks Deborah
"Deborah Pate (TeamB)" <XXXX@XXXXX.COM>wrote in
message news:XXXX@XXXXX.COM...
Quote
<<Luis Daniel Taballione:
I only need is set my alignment to Justify
>>

Word.Selection.Paragraphs.Alignment := wdAlignParagraphJustify;

--
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