Andre175
Gebruiker
- Lid geworden
- 2 feb 2018
- Berichten
- 351
goedenavond
Om 1 of andere reden lukt het niet meer om een pdf te maken en deze als bijlage per mail te versturen
Terwijl het altijd heeft gewerkt.
Ik vermoed dat het komt door een update van M.Office.
Ik krijg nu de tekst: "Not possible to create the PDF, possible reasons:"
"Microsoft Add-in is not installed"
"You Canceled the GetSaveAsFilename dialog"
"The path to Save the file in arg 2 is not correct"
"You didn't want to overwrite the existing PDF if it exist"
"You Canceled the GetSaveAsFilename dialog" is nvt
"The path to Save the file in arg 2 is not correct" het pad klopt
"You didn't want to overwrite the existing PDF if it exist" dit mag gerust
dus lijkt mij het probleem te liggen bij:
"Microsoft Add-in is not installed"
Zijn er meer mensen die hier problemen mee hebben na de update van M.Office?
de code die ik gebruik komt van R. de Bruin, die zal vast meer gebruikt worden.
Om 1 of andere reden lukt het niet meer om een pdf te maken en deze als bijlage per mail te versturen
Terwijl het altijd heeft gewerkt.
Ik vermoed dat het komt door een update van M.Office.
Ik krijg nu de tekst: "Not possible to create the PDF, possible reasons:"
"Microsoft Add-in is not installed"
"You Canceled the GetSaveAsFilename dialog"
"The path to Save the file in arg 2 is not correct"
"You didn't want to overwrite the existing PDF if it exist"
"You Canceled the GetSaveAsFilename dialog" is nvt
"The path to Save the file in arg 2 is not correct" het pad klopt
"You didn't want to overwrite the existing PDF if it exist" dit mag gerust
dus lijkt mij het probleem te liggen bij:
"Microsoft Add-in is not installed"
Zijn er meer mensen die hier problemen mee hebben na de update van M.Office?
de code die ik gebruik komt van R. de Bruin, die zal vast meer gebruikt worden.
Code:
Dim Sh As Worksheet
Dim FileName As String
If ActiveWindow.SelectedSheets.Count > 1 Then
MsgBox "There is more then one sheet selected," & vbNewLine & _
"ungroup the sheets and try the macro again"
Else
'Call the function with the correct arguments
'For a fixed range use this line
FileName = RDB_Create_PDF(Source:=Sheets("faktuur_Outdoor").Range("A1:K63"), _
FixedFilePathName:=Sheets("Instellingen").Range("C3").value & _
TbFaktNrOut.value & " " & _
Sheets("Faktuur_Outdoor").Range("M1").value & " " & _
Sheets("Faktuur_Outdoor").Range("M2").value & " " & _
Sheets("Faktuur_Outdoor").Range("M3").value & " " & _
TbDebiteurnrFakOut.value & " " & _
".pdf", _
OverwriteIfFileExist:=True, _
OpenPDFAfterPublish:=True)
'For the selection use Selection in the Source argument
'FileName = RDB_Create_PDF(Source:=Selection)
'For a fixed file name use this in the FixedFilePathName argument
'FixedFilePathName:="C:\Users\Ron\Test\YourPdfFile.pdf"
If FileName <> "" Then
RDB_Mail_PDF_Outlook FileNamePDF:=FileName, _
StrTo:=TbMailFakOut.value, _
StrCC:="", _
StrBCC:="", _
StrSubject:="Faktuur " & TbFaktNrOut.value, _
Signature:=True, _
Send:=False, _
StrBody:=""
Else
MsgBox "Not possible to create the PDF, possible reasons:" & vbNewLine & _
"Microsoft Add-in is not installed" & vbNewLine & _
"You Canceled the GetSaveAsFilename dialog" & 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
