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!

No Colour In Saved Report

Status
Not open for further replies.

Aidy680

Technical User
Nov 1, 2006
138
GB
When saving an Access report (XP) as a PDF (Acrobat Standard v.7) it doesn't save it in colour. When I open it it's just in B&W.

Does anyone know what setting I'm missing or do I need a different version of Acrobat?

Here's my code:

Public Sub PrintReportToAcrobat7(strReportName As String, strFileName As String, strErr As String)

On Error GoTo PrintReportToAcrobat7_Error

Dim sFileName As String

sFileName = strFileName

Set Application.Printer = Application.Printers("Adobe PDF")

'Registry settings ...

'Create the Registry Key where Acrobat looks for a file name
CreateNewRegistryKey HKEY_CURRENT_USER, _
"Software\Adobe\Acrobat Distiller\PrinterJobControl"

'Put the output filename where Acrobat could find it
SetRegistryValue HKEY_CURRENT_USER, _
"Software\Adobe\Acrobat Distiller\PrinterJobControl", _
Find_Exe_Name(CurrentDb.Name, CurrentDb.Name), _
sFileName
'Delete the file if it already exists
If Dir(sFileName) <> "" Then Kill sFileName

'On Error GoTo Err_handler
DoCmd.OpenReport strReportName, acViewNormal 'Run the report

While Len(Dir(sFileName)) = 0 ' Wait for the PDF to actually exist
DoEvents
Wend

'Close down the reports
DoCmd.Close acReport, strReportName, acSaveNo

Set Application.Printer = Nothing

PrintReportToAcrobat7_End:
Exit Sub


PrintReportToAcrobat7_Error:
strErr = Err.Description
Resume PrintReportToAcrobat7_End

End Sub

 
Sounds like an Acrobat setting. Maybe try in Adobe: Acrobat Forum forum223 ?

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top