Je souhaite utiliser le complément Adobe PDFMaker avec MS Outlook 2013.
Enregistrement de plusieurs courriels en pdf avec PDFMAKER
J'ai vu ce post et j'ai essayé le code, mais j'obtiens une erreur d'exécution 13 (type mismatch) à la ligne
Set pmkr2 = a.Object
Il semble que l'objet provenant de a.Object ne soit pas un objet PDFMaker. Voir cette photo J'utilise Adobe Acrobat DC 18.2816. Voici l'ensemble de mon code :
Sub ConvertToPDFWithLinks()
Dim pmkr2 As AdobePDFMakerForOffice.PDFMaker
'Set pmkr2 = Application.COMAddIns.Item(6).Object ' Assign object reference.
Set pmkr2 = Nothing
For Each a In Application.COMAddIns
If InStr(UCase(a.Description), "PDFMAKER") > 0 Then
Set pmkr2 = a.Object
Exit For
End If
Next
If pmkr2 Is Nothing Then
MsgBox "Cannot Find PDFMaker add-in", vbOKOnly, ""
Exit Sub
End If
Dim pdfname As String
pdfname = "C:\stuff\stuff\tester.pdf"
Dim stng As AdobePDFMakerForOffice.ISettings
pmkr2.GetCurrentConversionSettings stng
stng.AddBookmarks = True
stng.AddLinks = True
stng.AddTags = True
stng.ConvertAllPages = True
stng.CreateFootnoteLinks = True
stng.CreateXrefLinks = True
stng.OutputPDFFileName = pdfname
stng.PromptForPDFFilename = False
stng.ShouldShowProgressDialog = True
stng.ViewPDFFile = False
pmkr2.CreatePDFEx stng, 0
Set pmkr2 = Nothing ' Discontinue association.
End Sub
Ce serait très gentil si quelqu'un pouvait m'aider, merci d'avance !