Print Word Document from Access without user intervention

T

tekkie

Hi,

Based upon the criteria a user picks in a form I need to print a Word
document without any user intervention.

I would know the name of the file and the directory it is located in. I just
need to setup some code to automate the printing of the document.


Thanks in advance.
 
J

jimati

Try this...

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

tekkie

Is their a way to code around the dialog box for Read Only Files? The code
works great except the dialog box for a Read Only Document opens up which
must be acknowledged. If it could be coded to be read only that would be
great!

Thank you.
 

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