Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Word Documents in Background without Word

Status
Not open for further replies.

dparker1966

Programmer
Sep 1, 2000
5
0
0
US
I need to print a Word document from within VB without having Word installed. I have already downloaded the Word Viewer. I have tried RTF boxes and OLE but to no avail. I have read numerous post already but I cannot find exactly what I need. The application will be running from the C: drive and the Word documents will be stored on the network in a subdirectory from where I maintain the Access database.

Any help will be greatly appreciated!
 
Well, thats kind of impossible !!!

A word document has features that are supported (or can only be read) by certain functions that reside in several MS-OFFICE DLLs. The actual Dlls are stored & registered only during the Office setup.

An RTF box can only load succesfully a plain text or an RTF file. If you try to load a WORD document you'll get a lot of unreadable text among others. However if you save the document from within WORD as a simple .RTF file you'll be able to load it but some of the WORD features will be gone.

I've never used the word viewer but if it gives you the ability to print the document then you might have a chance by

SHELL &quot;C:\PROGRAM FILES\WORDVIEWER\Wordview.exe <filename>&quot;,2 'The target directory may vary.

Now use the

SENDKEYS &quot;^P&quot; 'Ctrl+P if it supported by the WORD-VIEWER.

to print the loaded document. Michael Manos
Automation R&D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top