Can Word Print Out Other Applications?

F

frankbelly

I was wondering if I could use MS Word to print out other applications (i.e.
PDF, Excel, etc.) I need to create a macro which can print the contents of a
folder. I know there are applications out there than can do this, but I need
to perform some specific operations within word that would will be
incorporated into printing files in various folders, many of which are not
..doc files.

I am going to create a dialog box which will show the folder list of files
to the user with a browse button to allow that user to select a folder. Once
the folder is selected they will see the files and have the option to print
them. I will include slip sheets with the file names which will print from
another tray in the printer.

Again, I know there are independent applications that can do this, but I
need to incorporate this into other functions that I am performing in Word.

Any help is greatly appreciated.

Thanks,
 
J

Jay Freedman

I was wondering if I could use MS Word to print out other applications (i.e.
PDF, Excel, etc.) I need to create a macro which can print the contents of a
folder. I know there are applications out there than can do this, but I need
to perform some specific operations within word that would will be
incorporated into printing files in various folders, many of which are not
.doc files.

I am going to create a dialog box which will show the folder list of files
to the user with a browse button to allow that user to select a folder. Once
the folder is selected they will see the files and have the option to print
them. I will include slip sheets with the file names which will print from
another tray in the printer.

Again, I know there are independent applications that can do this, but I
need to incorporate this into other functions that I am performing in Word.

Any help is greatly appreciated.

Thanks,

In Word VBA (or any other application that supports VBA) you can use the Shell
statement to run a command line. If the application in question supports
printing from the command line, you can use the Shell statement to execute it.
For example, Adobe Reader can be automated this way; see
http://support.adobe.com/devsup/devsup.nsf/docs/52080.htm

If the application that supports the document also supports VBA (this includes
all the Office applications), you can automate that application from inside Word
VBA. For an Excel example, see
http://www.word.mvps.org/FAQs/InterDev/ControlXLFromWord.htm.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top