Julesatwork
Technical User
Hi There
I am writing an app in MS Access 2000 which simply prints out inserts for a product containing details, barcode etc to a Xerox printer.
Because of formatting issues I am using word mailmerge documents (there is only 1 record being merged)
The users select their product from an access form which contains all the product info to be printed along with the template to open. They want it to run seamlessly, dont want to preview just simply print.
I have this working fine to a point with the following code;
Dim oApp As Word.Application
Dim oDoc As Word.Document
Dim mydoc As Word.Document
'Start a new document in Word
Set oApp = New Word.Application
'The path & file name will be a variable when completed
Set oDoc = oApp.Documents.Open (C:\Test2UTT.doc"
'Make Word invisible
oApp.Visible = False
'Proceed with mail merge
oDoc.MailMerge.Execute Pause:=False
'Close Main Document
oDoc.Close SaveChanges:=wdDoNotSaveChanges
'Print out new document
'oApp.ActiveDocument.PrintOut Background:=False
'Close New Document
oApp.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
'Quit Word
oApp.Quit
My problem is I also need to specify a specific printer and printer bin. I know I can specify No of copies using Printout but how do I parse this additional info.
Any advice on how I might do this would be appreciated bearing in mind the users dont want to see word at all.
Frustrated - Spent hours searching Microsoft & other forums!!!
Thanks in anticipation
Jules
I am writing an app in MS Access 2000 which simply prints out inserts for a product containing details, barcode etc to a Xerox printer.
Because of formatting issues I am using word mailmerge documents (there is only 1 record being merged)
The users select their product from an access form which contains all the product info to be printed along with the template to open. They want it to run seamlessly, dont want to preview just simply print.
I have this working fine to a point with the following code;
Dim oApp As Word.Application
Dim oDoc As Word.Document
Dim mydoc As Word.Document
'Start a new document in Word
Set oApp = New Word.Application
'The path & file name will be a variable when completed
Set oDoc = oApp.Documents.Open (C:\Test2UTT.doc"
'Make Word invisible
oApp.Visible = False
'Proceed with mail merge
oDoc.MailMerge.Execute Pause:=False
'Close Main Document
oDoc.Close SaveChanges:=wdDoNotSaveChanges
'Print out new document
'oApp.ActiveDocument.PrintOut Background:=False
'Close New Document
oApp.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
'Quit Word
oApp.Quit
My problem is I also need to specify a specific printer and printer bin. I know I can specify No of copies using Printout but how do I parse this additional info.
Any advice on how I might do this would be appreciated bearing in mind the users dont want to see word at all.
Frustrated - Spent hours searching Microsoft & other forums!!!
Thanks in anticipation
Jules