olá estou com uma rotina que gera um arquivo em PDF da mesma pasta m que está o documento do excel
gostaria de adapta-la para que criasse uma pasta ex: "C:pastaPDF" e salvasse o pdf na mesma,
se a pasta já existir salvar dentro da mesma.
rotina que estou usando
im SvInput As String
Dim Data As String
Dim var_MENSAGEM
Dim Nome As String
Dim UltimaLinha As Long
Sheets("Ficha Cliente").Select
UltimaLinha = Cells(Rows.Count, "A").End(xlUp).Row
ActiveSheet.PageSetup.PrintArea = Range("$A$1:$h$" & UltimaLinha).Address
Data = VBA.Format(VBA.Date, "dd-mm-yyyy")
SvInput = ThisWorkbook.Path & Application.PathSeparator & nomecliente & " - FICHA.CLIENTE - " & Data & ".pdf"
mensagem = MsgBox("PDF salvo com os dados do cliente: " & nomecliente)
With ActiveSheet
.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=SvInput, _
OpenAfterPublish:=True
End With
Obrigado
Postado : 22/06/2013 10:30 am