Goede dag,
onderstaande code moet van meerde exel sheets een pdf document maken , en dat pdf doc verzenden.
dit werkte tot aan vandaag al jaren goed (+/- 10jaar)
alleen na de update van windows niet meer
kan iemand mij helpen waarom ?
ik krijg de volgende foutmelding
"Microsoft Add-in is not installed" & vbNewLine & _ "The path to Save the file in arg 2 is not correct" & vbNewLine & _ "You didn't want to overwrite the existing PDF if it exist"
hier de code
Sub Mail_Every_Worksheet_With_Address_In_A1_PDF()
'Working only in 2007 and up
Dim sh As Worksheet
Dim TempFilePath As String
Dim TempFileName As String
Dim FileName As String
'Temporary path to save the PDF files
'You can also use another folder like
'TempFilePath = "C:\Users\info\MyFolder\"
TempFilePath = "C:\Users\admistartie\Desktop"
'Loop through every worksheet
For Each sh In ThisWorkbook.Worksheets
FileName = ""
'Test A1 for a mail address
If sh.Range("R8").Value Like "?*@?*.?*" Then
'If there is a mail address in R8 create the file name and the PDF
TempFileName = TempFilePath & "Factuur " & Range("R11") & " " _
& Range(" S11") _
& Range(" R10") _
& ".pdf"
FileName = RDB_Create_PDF(sh, TempFileName, True, False)
'If publishing is OK create the mail
If FileName <> "" Then
RDB_Mail_PDF_Outlook FileName, sh.Range("R8").Value, "[verk]Factuur", _
"In de bijlage vind u onze factuur" _
& vbNewLine & vbNewLine & "Met vriendelijke groet / Kind regards ," _
& vbNewLine & " " _
& vbNewLine & "Jan van Senten" _
& vbNewLine & " " _
& vbNewLine & "J.W. van Senten Aalsmeer B.V." _
& vbNewLine & "Legmeerdijk 129" _
& vbNewLine & "1432 KA Aalsmeer" _
& vbNewLine & "info@ vansenten.nl" _
& vbNewLine & "www.vansenten.nl" _
& vbNewLine & "Tel: 020-6477362", False
Else
MsgBox "Not possible to create the PDF, possible reasons:" & vbNewLine & _
"Microsoft Add-in is not installed" & vbNewLine & _
"The path to Save the file in arg 2 is not correct" & vbNewLine & _
"You didn't want to overwrite the existing PDF if it exist"
End If
End If
Next sh
End Sub