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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automaticly print a word document??

Status
Not open for further replies.

Junior1544

Technical User
Apr 20, 2001
1,267
US
What would be the easiest way of automaticly printing a msword document that is in the database as an ole object, without seeing the msword window, or if it has to come up for a minute, automaticly closing when it's done??

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
Junior, assuming that you are creating a Word Automation object within VBA, you can use the following method to render the Word application invisible while actions are performed

Dim WordObj As Word.Application
Dim WordDoc As Word.Document
Set WordObj = CreateObject("Word.Application")
Set WordDoc = WordObj.Documents.Open _
("your file path here")
WordObj.Visible = False 'This hides the app when is starts up
{what ever action you want on the document goes here}

WordObj.Quit
Set WordObj = Nothing 'kills the object instance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top