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

Automatically merge to new document then print duplex

Status
Not open for further replies.

FionaLFI

Programmer
May 4, 2012
1
0
0
IE
I need to produce a series of A3, two-sided sheets each week using data from a Microsoft Access database - there is a different set of data on each side of the sheet. I have written a macro which merges one set of data to a new document and then inserts the other set as a second page. It then dimensions this new document to A3. I want it to send it to print duplex, but I can't find how to do this. Can I insert PCL commands into the VB code? I can't put them as a field command in the document itself, because a new document is created each time.

Very grateful for any help.
 
The Duplex Property is also supported in the vb Printer Object; have you tried using that.
 
Hi Fiona,

If you're creating the document from a template, you can add the PRINT field to that. Furthermore, even if you're creating the document from scratch, you can add the PRINT field to document using code. That way, it will always print duplex. For example:
Code:
Dim Rng As Range
With ActiveDocument
  Set Rng = .Sections(1).Headers(wdHeaderFooterPrimary).Range.Characters.First
  Rng.Collapse wdCollapseStart
  .Fields.Add Range:=Rng, Type:=wdFieldEmpty, Text:="PRINT 27""&l1S""", PreserveFormatting:=False
End With

Cheers
Paul Edstein
[MS MVP - Word]
 
It looks like you really want forum705

This one is for the full application development systems VB 5 & VB6, not for Access macro issues.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top