{"id":5866,"date":"2015-07-22T15:51:22","date_gmt":"2015-07-22T06:51:22","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=5866"},"modified":"2018-08-31T14:56:38","modified_gmt":"2018-08-31T05:56:38","slug":"acrobat%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6pdf%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e7%b5%90%e5%90%88%e3%81%99%e3%82%8bvba%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=5866","title":{"rendered":"Acrobat\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308bVBA\u30de\u30af\u30ed"},"content":{"rendered":"<p><a href=\"\/\/www.ka-net.org\/blog\/?p=5861\" target=\"_blank\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u3067\u306f\u3001iTextSharp\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308bPowerShell\u30b3\u30fc\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306fAcrobat\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  Dim v As Variant '\u7d50\u5408\u5143PDF\u30d5\u30a1\u30a4\u30eb\r\n  \r\n  v = Array( _\r\n        &quot;C:\\Test\\Sample01.pdf&quot;, _\r\n        &quot;C:\\Test\\Sample02.pdf&quot;, _\r\n        &quot;C:\\Test\\Sample03.pdf&quot;, _\r\n        &quot;C:\\Test\\Sample04.pdf&quot; _\r\n      )\r\n  MergePDF v, &quot;C:\\Test\\Output.pdf&quot;\r\nEnd Sub\r\n\r\nPrivate Sub MergePDF(ByVal InputFilePath As Variant, _\r\n                     ByVal OutputFilePath As String)\r\n'Acrobat\u3092\u5229\u7528\u3057\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308b\r\n  Dim pdoc As Object\r\n  Dim i As Long\r\n  Const PDSaveFull = &amp;H1\r\n  \r\n  With CreateObject(&quot;AcroExch.PDDoc&quot;)\r\n    If .Create = True Then\r\n      Set pdoc = CreateObject(&quot;AcroExch.PDDoc&quot;)\r\n      For i = LBound(InputFilePath) To UBound(InputFilePath)\r\n        If pdoc.Open(InputFilePath(i)) = True Then\r\n          .InsertPages .GetNumPages() - 1, pdoc, 0, pdoc.GetNumPages() - 1, True\r\n          pdoc.Close\r\n        End If\r\n      Next\r\n      .Save PDSaveFull, OutputFilePath\r\n      .Close\r\n    End If\r\n  End With\r\nEnd Sub<\/pre>\n<p>PDF\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066InsertPages\u30e1\u30bd\u30c3\u30c9\u3067\u30da\u30fc\u30b8\u3092\u633f\u5165\u3059\u308b\u3060\u3051\u306e\u7c21\u5358\u306a\u30de\u30af\u30ed\u3067\u3059\u3002<br \/>\n\u3084\u306f\u308aVBA\u304b\u3089PDF\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3059\u308b\u3068\u304d\u306f\u672c\u5bb6Acrobat\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n<hr \/>\n<p><span style=\"color: #ff0000; font-weight: bold;\">2018\/8\/31 \u8ffd\u8a18\uff1a<\/span><br \/>\n\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3057\u305f\u8907\u6570\u306ePDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=10764\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Acrobat-120x120.png' alt='Acrobat\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308bVBScript' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2018.08.31<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=10764\">Acrobat\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308bVBScript <\/a><\/div><div class=\"cardlink_excerpt\">\u300cAcrobat PDF \u7d50\u5408 \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u300d\u3068\u3044\u3063\u305f\u30ad\u30fc\u30ef\u30fc\u30c9\u691c\u7d22\u3067\u306e\u30a2\u30af\u30bb\u30b9\u304c\u3042\u308a\u307e\u3057\u305f\u3002\r\nAcrobat\u306b\u3088\u308bPDF\u30d5\u30a1\u30a4\u30eb\u306e\u7d50\u5408\u51e6\u7406\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u5b9f\u884c\u3057\u305f\u3044\u65b9\u306b\u3088\u308b\u691c\u7d22\u3060\u3068\u601d\u3044\u307e\u3059\u3002\r\n\r\nAdobe\u30d5\u30a9\u30fc\u30e9\u30e0\u306e\u4e0b\u8a18\u30b9\u30ec\u30c3\u30c9\u3092\u898b\u308b\u9650\u308a\u3001\u6b8b\u5ff5\u306a...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001iTextSharp\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308bPowerShell\u30b3\u30fc\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306fAcrobat\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 Option Ex [&hellip;]","protected":false},"author":1,"featured_media":7108,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"\u672c\u5bb6Acrobat\u306f\u3084\u3063\u3071\u308a\u4fbf\u5229\u3067\u3059\u3002 [Acrobat\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3059\u308bVBA\u30de\u30af\u30ed]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,136],"tags":[],"class_list":["post-5866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-acrobat"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Acrobat.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-1wC","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5866"}],"version-history":[{"count":3,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5866\/revisions"}],"predecessor-version":[{"id":10768,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5866\/revisions\/10768"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7108"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}