Board index » delphi » Delphi, DDE, OLE, Word, Excel and PowerPoint

Delphi, DDE, OLE, Word, Excel and PowerPoint

Hello,

I am creating an application that can by itself print documents from a
directory.
The tasks:
1. Check for existance of document
2. Open relevant application (Word, Excel or PowerPoint, for the moment)
3. Open file in application
4. Print document
5. Close application
6. Move document to printed-directory

I know I should use DDE or OLE, but how do I tell Word or Excel to open a
file, print that file (to a specific printer), close the file and exit?

Any suggentions are welcome,
Thanks in advance

--
Ronald Bonneveld
System Engineer RELAY International
email: bonnev...@ibp.nl

 

Re:Delphi, DDE, OLE, Word, Excel and PowerPoint


On 21 Jan 1997 08:22:08 GMT, "Ronald Bonneveld" <bonnev...@ibp.nl>
wrote:

Quote
>Hello,

>I am creating an application that can by itself print documents from a
>directory.
>The tasks:
>1. Check for existance of document
>2. Open relevant application (Word, Excel or PowerPoint, for the moment)
>3. Open file in application
>4. Print document
>5. Close application
>6. Move document to printed-directory

>I know I should use DDE or OLE, but how do I tell Word or Excel to open a
>file, print that file (to a specific printer), close the file and exit?

Open the registry (both Win3.1, Win95); look up the file associations
and make your way to the shell\print\ddeexec line, e.g.:

.doc -> word.document.6
word.document.6 -> shell -> print -> ddeexec -> ... do this.

--
Stefan Hoffmeister                   Stefan.Hoffmeis...@Uni-Passau.de
University of Passau, Bavaria, Germany

Re:Delphi, DDE, OLE, Word, Excel and PowerPoint


Quote
Stefan Hoffmeister wrote:

...
Quote
> >I am creating an application that can by itself print documents from a
> >directory.
...
> Open the registry (both Win3.1, Win95); look up the file associations
> and make your way to the shell\print\ddeexec line, e.g.:

> .doc -> word.document.6
> word.document.6 -> shell -> print -> ddeexec -> ... do this.

...

Blah-Blah-Blah...
It is ALL NOT NECESSARY !

Check ShellApi reference ! ShellExecuteEx function is not only for
execute a program file but is capable of printing any OLE registered
document type according to the registry print information with a single
call !

Best: Andrew

Other Threads