Help w/ printer settings in Word from Access using .ActiveDocument

THAWK

New member
Local time
Today, 11:14
Joined
Jul 2, 2008
Messages
6
I am doing a mailmerge from Access to Word but evertime I load Word it reverts to the systems default printer settings. The document requires some specific settings that I want loaded everytime this document is opened.

My code is:

Sub Open3rdLetter(strDocName As String)
Dim objApp As Object
Set objApp = CreateObject("Word.Application")

With objApp
.Visible = True
.Documents.Open strDocName

strConnect = "DSN=MS Access Database;DBQ=" & CurrentDb.Name & "FIL=MS Access;"
.ActiveDocument.MailMerge.OpenDataSource Name:="G:\AW_GHCS_IS\3rdLetters.xls"
.ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
'this is where I want to place some code for printer settings.
End With
Set objApp = Nothing
End Sub

There will be different users running this mailing and I can't expect them all to have their default settings the same as this is quite specific.

The printer is: HP Laserjet 8150 PCL 5e
And I have set up a Print Task Quick Set default called: 2594LH2Sides.
(Basically it prints double sided on headed paper for the first page and plain after that)

I have tried using something similar to this:

With ActiveDocument.PageSetup
..FirstPageTray = wdPrinterUpperBin
..OtherPagesTray = wdPrinterLowerBin

But first I need to know how to change to the correct printer as it always defaults to my normal printer which does not have these settings.

I have tried setting the Word documents settings to this other printer but can not make it stick.

Many thanks for your help :rolleyes:
 
Try:

Code:
objApp.activeprinter = "HP Laserjet 8150 PCL 5e"
 

Users who are viewing this thread

Back
Top Bottom