Print in pdf from the engines

3

Good afternoon,

I'm trying to use this piece of code to print in pdf ...

Private Sub EditorVendas_DepoisDeImprimir(Filial As String, Serie As String, 
Tipo As String, NumDoc As Long)
Dim strNomeMapa As String

strNomeMapa = "C\PDF\" & Tipo & "_" & Serie & "_" & NumDoc & ".pdf"

BSO.Comercial.Vendas.ImprimeDocumento Tipo, Serie, NumDoc, Filial, , , , 
DestinoPDF:=strNomeMapa
End Sub

is giving the following message ...

Can anyone help me? What parameters are missing?

Thank you for your attention.

    
asked by anonymous 17.04.2018 / 16:08

2 answers

2
Private Sub EditorVendas_DepoisDeImprimir(Filial As String, Serie As String, 
Tipo As String, NumDoc As Long)
Dim strNomeMapa As String

strNomeMapa = "C:\PDF\" & Tipo & "_" & Serie & "_" & NumDoc & ".pdf"

BSO.Comercial.Vendas.ImprimeDocumento Tipo, Serie, NumDoc, Filial, , , , 
DestinoPDF:=strNomeMapa
End Sub

Left without: next to C (C:)

    
17.04.2018 / 18:49
2

For shared code, the error is in the map path: Where C\PDF\" & Tipo & "_" & Serie & "_" & NumDoc & ".pdf must be C:\PDF\" & Tipo & "_" & Serie & "_" & NumDoc & ".pdf . The two points are missing from the drive.

Complete example:

Private Sub EditorVendas_DepoisDeGravar(Filial As String, Serie As String, 
Tipo As String, NumDoc As Long)
Dim strNomeMapa As String

strNomeMapa = PSO.Strings.Formata("C:\temp\@1@_@2@_@[email protected]", Tipo, Serie, 
NumDoc)

BSO.Comercial.Vendas.ImprimeDocumento Tipo, Serie, NumDoc, Filial, 1, 
"gcpvls01", False, strNomeMapa

End Sub
    
17.04.2018 / 18:45