2013と2016でテスト
If (Application.Version < 15) Then
Return
End If
Dim ver As String
ver = Int(Application.Version) & ".0"
Dim wsh As New IWshRuntimeLibrary.WshShell 'Windows Script Host Object Model参照
Dim desktop As String
desktop = wsh.SpecialFolders("Desktop") & "\"
Dim regPath As String
regPath = "HKCU\Software\Microsoft\Office\" & ver & "\Common\FixedFormat\LastISO19005-1"
Call wsh.RegWrite(regPath, 0, "REG_DWORD")
Call ThisWorkbook.ExportAsFixedFormat(xlTypePDF, desktop & "NotPDF_A.pdf")
Call wsh.RegWrite(regPath, 1, "REG_DWORD")
Call ThisWorkbook.ExportAsFixedFormat(xlTypePDF, desktop & "PDF_A.pdf")
個別に明示されていない限りgekkaがフォーラムに投稿したコードにはフォーラム使用条件に基づき「MICROSOFT LIMITED PUBLIC LICENSE」が適用されます。(かなり自由に使ってOK!)