Print Excel / Power Point Files

K

KitCaz

Recently someone provided some succinct code to print Word documents from VB
code. Can someone provide similar code for printing Excel / Power Point
files?

Word code:

Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
WordObj.Documents.Open "c:\yourfile.doc"
WordObj.PrintOut Background:=False, Copies:=1
WordObj.Quit
Set WordObj = Nothing
 

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

Similar Threads

Print Excel file via VB 3
Print a PDF File in VBA Code 2
Convert Word to prn 1
print word document 1
Strange problem 2
Open Word 5
Need help with Printing 1
Disable Fieldcode 'Fillin' 1

Top