| View previous topic :: View next topic |
| Author |
Message |
Will1 Guest
|
Posted: Tue Jan 20, 2004 3:40 am Post subject: Previewing a word document inside my application |
|
|
Hi, my cuestion is how can I preview a word document, but inside of a
delphi form, thanks a lot
--- posted by geoForum on http://delphi.newswhat.com
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Tue Jan 20, 2004 5:47 am Post subject: Re: Previewing a word document inside my application |
|
|
| Quote: | Hi, my cuestion is how can I preview a word document, but inside of a
delphi form, thanks a lot
Use TOLEContainer and load your doc-file there using |
TOLEContainer.CreateObjectFromFile method...
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com
|
|
| Back to top |
|
 |
Will1 Guest
|
Posted: Wed Jan 21, 2004 1:50 am Post subject: Re: Previewing a word document inside my application |
|
|
Can you gime me an example please?
[email]amarquez80itv (AT) yahoo (DOT) com[/email]
--- posted by geoForum on http://delphi.newswhat.com
|
|
| Back to top |
|
 |
Warren Postma Guest
|
Posted: Wed Jan 21, 2004 7:50 pm Post subject: Re: Previewing a word document inside my application |
|
|
Will1 wrote:
| Quote: | Can you gime me an example please?
[email]amarquez80itv (AT) yahoo (DOT) com[/email]
--- posted by geoForum on http://delphi.newswhat.com
|
(1) Create new blank project.
(2) go to the System tab of your component palette. Click on the icon
that says OLE, now click on the Form1 window.
(3) Drop an OpenDialog on your form, and also add a Button or a Menu
(4) Double click on the button, or Menu item handler, and write this code:
if OpenDialog1.Execute then begin
OleContainer1.CreateObjectFromFile
( OpenDialog1.FileName,false);
OleContainer1.DoVerb(ovShow);
end;
Warren Postma
|
|
| Back to top |
|
 |
Will1 Guest
|
Posted: Thu Jan 22, 2004 12:50 am Post subject: Re: Previewing a word document inside my application |
|
|
| Quote: | Hi, my cuestion is how can I preview a word document, but inside of a
delphi form, thanks a lot
Use TOLEContainer and load your doc-file there using
TOLEContainer.CreateObjectFromFile method...
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com
Can you give me an example, please?
|
--- posted by geoForum on http://delphi.newswhat.com
|
|
| Back to top |
|
 |
Will1 Guest
|
Posted: Thu Jan 22, 2004 12:51 am Post subject: Re: Previewing a word document inside my application |
|
|
| Quote: | Hi, my cuestion is how can I preview a word document, but inside of a
delphi form, thanks a lot
can you give me an example?
|
--- posted by geoForum on http://delphi.newswhat.com
|
|
| Back to top |
|
 |
Will1 Guest
|
Posted: Thu Jan 22, 2004 12:54 am Post subject: Re: Previewing a word document inside my application |
|
|
Can you give me and example please?
--- posted by geoForum on http://delphi.newswhat.com
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Thu Jan 22, 2004 5:44 am Post subject: Re: Previewing a word document inside my application |
|
|
| Quote: | Can you give me and example please?
Yesterday in message from Warren Postma you see absolutelly correct answer. |
Just drop TOLEContainer component on form and in run-time call the
CreateObjectFromFile method:
OleContainer1.CreateObjectFromFile(yourFileName, False);
There everything is clear...
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com
|
|
| Back to top |
|
 |
Will1 Guest
|
Posted: Thu Jan 22, 2004 11:31 pm Post subject: Re: Previewing a word document inside my application |
|
|
Thanks a lot pal
--- posted by geoForum on http://delphi.newswhat.com
|
|
| Back to top |
|
 |
|