Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Just to let you know...what a great site you have. I posted a pretty generic question yesterday and have had 8 responses already, anyway thanks again and keep up the good work..."

Geography

Where in the world do Tek-Tips members come from?

Automatically merge to new document then print duplex

FionaLFI (Programmer)
4 May 12 12:40
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.
HughLerwill (Programmer)
4 May 12 17:05
Have never tried using the Duplex Property when using the Microsoft VB Printer Dialog VbPrnDlg.dll'ref. http://support.microsoft.com/default.aspx?scid=kb;en-us;322710 but it is supported.
HughLerwill (Programmer)
4 May 12 17:22
The Duplex Property is also supported in the vb Printer Object; have you tried using that.
macropod (TechnicalUser)
7 May 12 0:50
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]

dilettante (MIS)
7 May 12 16:16
It looks like you really want forum705: Microsoft: Access Modules (VBA Coding)

This one is for the full application development systems VB 5 & VB6, not for Access macro issues.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close