M
mecg96
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
Rs.Close
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?
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
Rs.Close
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?