Printing Word/Excel from a CW app 
Author Message
 Printing Word/Excel from a CW app

Hi

I have an app. (CW 2003)  witch communicate with Word/Excel during DDE
calls.  I also want to print the documents (in Word/Excel) from a browse in
my app witch contain the path and filename for the documents.  Anybody know
how to to this without first opening  the documents in Word/Excel ?

--
Dag B. Hildre



Fri, 18 May 2001 03:00:00 GMT  
 Printing Word/Excel from a CW app
Try POWERRun from Greg Berthume.........

http://members/aol.com/GBerthume

There is a template that allows you to enter the path and file name
either directly or by variable and will fire up that program with the
selected file opened for you. Print from there.

Regards

Tony York
Fiscal Software
Perth Western Australia

Quote:

> Hi

> I have an app. (CW 2003)  witch communicate with Word/Excel during DDE
> calls.  I also want to print the documents (in Word/Excel) from a browse in
> my app witch contain the path and filename for the documents.  Anybody know
> how to to this without first opening  the documents in Word/Excel ?

> --
> Dag B. Hildre



Sat, 19 May 2001 03:00:00 GMT  
 Printing Word/Excel from a CW app
First, I have never done this, but....
If you go into Explorer, choose View, Options, File Types.
Highlight Microsoft Word Document, Click Edit, in the actions list
highlight Print, then click Edit
From there you have the users path to WinWord.exe, and you'll notice the /x
parameter.

So you can run "WinWord.exe /x"

You also have syntax for DDE communications. The first DDE string is for
when Word is already running, replace the %1 with the Word File to print.
[REM _DDE_Minimize][FileOpen("%1")][FilePrint 0][DocClose 2]

The second DDE string is for when Word is NOT already running.
[FileOpen("%1")][FilePrint 0][FileExit 2]

These are the DDE strings for making Explorer print a Word document. You
should be able to do something similar. Research DDE with Clarion a little
first and then try it. If you really want to get fancy, dive into registry
functions and learn where these strings reside in the registry, then you
can (should be able to) read these strings from the registry, and if the
DDE syntax changes with the next version of Word, your Clarion program will
get the new syntax from the registry and still be able to print a Word
document.

HTH,

Jeff Berlinghoff
Tallahassee, Florida
Florida Department of Environmental Protection
Division of Law Enforcement

epic6.dep.state.fl.us



Quote:
> Hi

> I have an app. (CW 2003)  witch communicate with Word/Excel during DDE
> calls.  I also want to print the documents (in Word/Excel) from a browse
in
> my app witch contain the path and filename for the documents.  Anybody
know
> how to to this without first opening  the documents in Word/Excel ?

> --
> Dag B. Hildre



Sat, 19 May 2001 03:00:00 GMT  
 Printing Word/Excel from a CW app
Hi,
You can print Word documnets using WordBasic object. Here is an example:
Create an OCX control and call it ?Word. Then you can use the following
code:

?Word{Prop:Create} = 'Word.Basic'
BIND('WordFileName',WordFileName)
WordFileName = 'mydocument.doc'
?Word{'fileopen(&WordFileName)'} ! Opens file
?Word{'FilePrintDefault'}        ! Prints to the default printer
?Word{PROP:Deactivate}

HTH
Leonid Chudakov

Quote:

> Hi

> I have an app. (CW 2003)  witch communicate with Word/Excel during DDE
> calls.  I also want to print the documents (in Word/Excel) from a browse in
> my app witch contain the path and filename for the documents.  Anybody know
> how to to this without first opening  the documents in Word/Excel ?

> --
> Dag B. Hildre



Sat, 19 May 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Starting Excel and Word from App

2. Printing a report ot word, Excel

3. CW apps DDE -> Word/Office 97

4. Printing CW Reports to file for Word

5. Printing Word Document in Clarion App

6. Word and Excel

7. Report Template from Browse that provides a Report with Word and Excel output

8. Reading/Writing from/to Excel/Word using DDE (PLEASE HELP)

9. About working by OLE2 with EXCEL 7.0, Page Maker Table Editor and MS Word 7.0

10. Export to Word or Excel 97

11. Working with Excel and Word from CW3

12. Create Windows Excel, Word file

 

 
Powered by phpBB® Forum Software