Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2005, 10:53 PM
dorjvar dorjvar is offline
Member
 
Join Date: May 2005
Posts: 38
Default Msword&Delphi

Hello Dear Friends
I Want That Call MsWord From Delphi and send Parameter To Word
and Can Save Word File than INside Delphi
or If can Load A limited Msword Inside Delphi form
And Manage it
Thanks Dorjvar
Reply With Quote
  #2  
Old 07-20-2005, 11:11 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,333
Default RE: Msword&Delphi

Hi ...

Keyword is Ole-Automation ...
Information on this at Deborah's page ...

MvG
Peter

Objective reality is a delirium caused by lack of alcohol in blood.
24 hous in a day, 24 beers in a case. Coincidence ???
There are 10 kinds of people: Those who understand binary and those who don't
Reply With Quote
  #3  
Old 07-21-2005, 12:08 AM
digitiger digitiger is offline
Senior Member
 
Join Date: Jan 2001
Posts: 716
Default RE: Msword&Delphi

you may go through the various articles listed at following urls


http://www.delphi3000.com/articles/article_1707.asp?SK=

though you will see members only tag at the top of the page when you visit above url but if you scroll down you will also see all the contents without being a memebr

then there are some articles at followng

http://www.kayodeok.btinternet.co.uk/favorites/kbofficewordhowto.htm


you can also use components from following urls

http://swiss.torry.net/spellcheckers.htm

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2043&lngWId=-1

http://www.soft411.com/software/delphi-spell-check.html

http://www.soft411.com/software/delphi-spell-checker.html

http://www.soft411.com/software/word-addin_2.html



you may also go through the following code and pick what ever helps you



USES ComObj;
.................................................. .
.................................................. .
var
Word : OLEVariant;
begin
Word := CreateOLEObject('Word.Application');

//Opens the file.
Word.documents.Open('C:\MyDocument\Myfile.DOC');


//If you want to make Word visible.
Word.Visible := True;

//If you want to Preview the document before printing.
//NOTE: Word has to be visible to Preview.
if Word.Application.PrintPreview = False Then
begin
Word.ActiveDocument.PrintPreview;
while Word.Application.PrintPreview = True do begin
end;
end;

//If you made Word visible then you have to hide it here.
Word.Visible := False;

//If you want to print.
Word.ActiveDocument.PrintOut(False);

//If you want to save the document to another file name after the changes.
Word.ActiveDocument.SaveAs('C:\MyDocument\Myfile.D OC');

//Quits Word Application
Word.Quit;
Word := Nil;



HOPE IT HELPS AND IF IT DOES THEN DO ACCEPT THE ANSWERE
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 12:45 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.