Link to home
Start Free TrialLog in
Avatar of shrldu
shrldu

asked on

How to print Word 6 files using Delphi 1 DDE?

How I can make Word 6 print a document from Delphi 1 application using DDE?
Where can I find Word 6 DDE macros?
Avatar of viktornet
viktornet
Flag of United States of America image

Is this what you're looking for?

ShellExecute(0, 'print', 'C:\windows\desktop\test.doc', nil, nil, SW_NORMAL);

Hope this helps..

—Viktor
——Ivanov
ASKER CERTIFIED SOLUTION
Avatar of BlackMan
BlackMan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shrldu
shrldu

ASKER

BlackMan, I knew it was something like that... But how it looks _exactly_? You missed the second parameter in Execute macro, WaitFlg. But even when I put it in the place the result was that string 'Print' was inserted into the Word document. And I don't know how to connect WordBasic syntax with Delphi one.

Victor, it works great, but it seems to be file extension-depended, isn't it? I wanted to have more control with DDE...

Thanks
I have tested it only with DOC extensions, but I don't know if it is dependent... You might try and see if it works for other extensions also... Good Luck!

-Viktor
--Ivanov