Printing from a Form to an image using Image Writer



I want to print each record from a form to an image using Microsoft Office
Document Image Writer. The problem is that when I use this command:

DoCmd.Printout acSelection

I cannot assign the filename for the image.

I have the following:

Sub Printout()
Dim frmCurrent As Form
Dim BadgeNumber As Variant
Dim RecordCount As Integer
Dim Rs As Recordset
Dim Db As Database

Set Db = CurrentDb()
Set Rs = Db.OpenRecordset("DATA")
RecordCount = Rs.RecordCount

Set Application.Printer = Application.Printers("Microsoft Office Document
Image Writer")

DoCmd.OpenForm "FORM_Employee", acNormal
Set frmCurrent = Screen.ActiveForm

For X = 1 To RecordCount

BadgeNumber = frmCurrent!BADGE
DoCmd.Printout acSelection <---- HOW CAN I ASSIGN THE FILENAME HERE???
DoCmd.GoToRecord acDataForm, "FORM_Employee", acNext

Next X
End Sub

Is there another way to print out to an image?


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question