In Access VBA, I have a procedure to convert Access reports to .pdf files.
It works very well for me.The problem is that when I call it repeatedly, I get a pop-up message that I can barely read. In the top left corner, there's an icon, followed by the text >> Print, and in the center, it says something like >> Extracting... (I can't read any more):
it does a good job, but the message for each report is annoying. Do any of you know how to remove it?
The Code
'Para ésta Aplicación necesitaré unas variables Publicas que son >>
Public NombInf As String
Public AñoInf As String
Public MesInf As String
Public DiaInf As String
Public FechaCompleta As String
Public Sub CreaPDFMuniAñoMes()
Dim RutaPDF As String, IzqPDF As String, CentroPDF As String, NombreInfPDF As String, RutaYFicheroPDF As String
On Error GoTo ErrorCreaPDFMuniAñoMes
'Defino la Parte Izquierda como el NombreInforme, pero puede ser Compuesto. En éste caso no lo pongo.
'IzqPDF = NombreInforme
'Defino la parte Central del Informe
CentroPDF = NombInf & AñoInf & MesInf
'Defino el Nombre completo del Fichero que se va a guardar
NombreInfPDF = CentroPDF & ".pdf"
'Defino la Ruta donde están los Ficheros PDF
RutaPDF = Application.CurrentProject.Path & "\InformesPDF\"
'Completo la cadena para guardarlo
RutaYFicheroPDF = RutaPDF & NombreInfPDF 'Sería >> Application.CurrentProject.Path & "\InformesPDF\NombInf & AñoInf & MesInf & ".pdf""
DoCmd.OutputTo acOutputReport, NombreInforme, acFormatPDF, RutaYFicheroPDF, False, , , acExportQualityPrint 'Si se quiere visualizar el PDF >> Poner True
SalidaCreaPDFMuniAñoMes:
On Error GoTo 0
Exit Sub
ErrorCreaPDFMuniAñoMes:
MsgBox "Error " & Err.Number & " en Procedimiento.: CreaPDFMuniAñoMes de Documento VBA: MdlPDF (" & Err.Description & ")"
Resume SalidaCreaPDFMuniAñoMes
End Sub 'CreaPDFMuniAñoMes()
It works very well for me.The problem is that when I call it repeatedly, I get a pop-up message that I can barely read. In the top left corner, there's an icon, followed by the text >> Print, and in the center, it says something like >> Extracting... (I can't read any more):
it does a good job, but the message for each report is annoying. Do any of you know how to remove it?
The Code
'Para ésta Aplicación necesitaré unas variables Publicas que son >>
Public NombInf As String
Public AñoInf As String
Public MesInf As String
Public DiaInf As String
Public FechaCompleta As String
Public Sub CreaPDFMuniAñoMes()
Dim RutaPDF As String, IzqPDF As String, CentroPDF As String, NombreInfPDF As String, RutaYFicheroPDF As String
On Error GoTo ErrorCreaPDFMuniAñoMes
'Defino la Parte Izquierda como el NombreInforme, pero puede ser Compuesto. En éste caso no lo pongo.
'IzqPDF = NombreInforme
'Defino la parte Central del Informe
CentroPDF = NombInf & AñoInf & MesInf
'Defino el Nombre completo del Fichero que se va a guardar
NombreInfPDF = CentroPDF & ".pdf"
'Defino la Ruta donde están los Ficheros PDF
RutaPDF = Application.CurrentProject.Path & "\InformesPDF\"
'Completo la cadena para guardarlo
RutaYFicheroPDF = RutaPDF & NombreInfPDF 'Sería >> Application.CurrentProject.Path & "\InformesPDF\NombInf & AñoInf & MesInf & ".pdf""
DoCmd.OutputTo acOutputReport, NombreInforme, acFormatPDF, RutaYFicheroPDF, False, , , acExportQualityPrint 'Si se quiere visualizar el PDF >> Poner True
SalidaCreaPDFMuniAñoMes:
On Error GoTo 0
Exit Sub
ErrorCreaPDFMuniAñoMes:
MsgBox "Error " & Err.Number & " en Procedimiento.: CreaPDFMuniAñoMes de Documento VBA: MdlPDF (" & Err.Description & ")"
Resume SalidaCreaPDFMuniAñoMes
End Sub 'CreaPDFMuniAñoMes()