{"id":14124,"date":"2021-09-29T22:50:11","date_gmt":"2021-09-29T13:50:11","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=14124"},"modified":"2021-09-29T22:50:11","modified_gmt":"2021-09-29T13:50:11","slug":"pdf%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e3%83%95%e3%82%a3%e3%83%bc%e3%83%ab%e3%83%89%e3%82%92%e8%aa%ad%e3%81%bf%e5%8f%96%e3%82%8a%e5%b0%82%e7%94%a8%e3%81%ab%e3%81%99%e3%82%8bvba%e3%83%9e","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=14124","title":{"rendered":"PDF\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\u3059\u308bVBA\u30de\u30af\u30ed"},"content":{"rendered":"<p><i>\u300cPDF\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5024\u3092\u5165\u529b\u3057\u305f\u5f8c\u3001\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\u3059\u308b\u306b\u306f\u3069\u3046\u3057\u305f\u3089\u826f\u3044\u304b\uff1f\u300d<\/i>\u3001\u3068\u3044\u3046\u8cea\u554f\u3092\u9802\u304d\u307e\u3057\u305f\u3002<br \/>\n\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u64cd\u4f5c\u3059\u308b\u30de\u30af\u30ed\u306b\u3064\u3044\u3066\u306f\u3001\u4f55\u5e74\u304b\u524d\u306b\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=4054\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel-120x120.png' alt='PDF\u30d5\u30a1\u30a4\u30eb\u306b\u5dee\u3057\u8fbc\u307f\u5370\u5237\u3059\u308bVBA\u30de\u30af\u30ed' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2014.02.24<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=4054\">PDF\u30d5\u30a1\u30a4\u30eb\u306b\u5dee\u3057\u8fbc\u307f\u5370\u5237\u3059\u308bVBA\u30de\u30af\u30ed <\/a><\/div><div class=\"cardlink_excerpt\">\u3053\u306e\u30da\u30fc\u30b8\u306b\u3082\u3042\u308b\u3088\u3046\u306b\u3001Acrobat\u306fOLE\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u6a5f\u80fd\u306b\u3088\u3063\u3066VBA\u30de\u30af\u30ed\u304b\u3089\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\r\n\r\n\u4eca\u56de\u306fWord\u306e\u5dee\u3057\u8fbc\u307f\u5370\u5237\u6a5f\u80fd\u306e\u3088\u3046\u306b\u3001\u6307\u5b9a\u3057\u305fPDF\u30d5\u30a1\u30a4\u30eb\u306e\u6307\u5b9a\u3057\u305f\u30d5\u30a9\u30fc\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5024\u3092\u5dee\u3057\u8fbc\u3080\u51e6\u7406\u3092\u8003\u3048\u3066\u307f\u307e\u3059\u3002\r\n\r\n\r...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6637\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel-120x120.png' alt='PDF\u30d5\u30a1\u30a4\u30eb\u4e0a\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2016.02.03<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6637\">PDF\u30d5\u30a1\u30a4\u30eb\u4e0a\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed <\/a><\/div><div class=\"cardlink_excerpt\">\u300cPDF\u30d5\u30a1\u30a4\u30eb\u306b\u5dee\u3057\u8fbc\u307f\u5370\u5237\u3059\u308bVBA\u30de\u30af\u30ed\u300d\u3067\u3001Acrobat\u3092\u64cd\u4f5c\u3057\u3066PDF\u4e0a\u306e\u30d5\u30a9\u30fc\u30e0\u306b\u30c7\u30fc\u30bf\u3092\u5dee\u3057\u8fbc\u3080\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u201c\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u308b\u306b\u306f\u3069\u3046\u3057\u305f\u3089\u826f\u3044\u304b\uff1f\u201d\u3001\u3068\u3044\u3046\u8cea\u554f\u304c\u3042\u308a\u307e\u3057\u305f\u3002\r\n\r\n\u7b54\u3048\u306f\u7c21\u5358\u3067\u3001getFi...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<p>Acrobat JavaScript\u306eField\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f\u3001\u305d\u306e\u3082\u306e\u30ba\u30d0\u30ea\u306e\u300creadonly\u300d\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u4e0a\u8a18\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306bGetJSObject\u30e1\u30bd\u30c3\u30c9\u7d4c\u7531\u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">'Acrobat JavaScript\u3067\u30d5\u30a3\u30fc\u30eb\u30c9\u64cd\u4f5c\r\nPublic Sub Sample()\r\n  Dim app As Object\r\n  Dim avdoc As Object\r\n  Const PDSaveFull = &amp;H1\r\n  Const PdfFilePath As String = &quot;C:\\Test\\PDF\\\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u30b5\u30f3\u30d7\u30eb.pdf&quot; 'PDF\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\r\n  \r\n  Set app = CreateObject(&quot;AcroExch.App&quot;)\r\n  Set avdoc = CreateObject(&quot;AcroExch.AVDoc&quot;)\r\n  If avdoc.Open(PdfFilePath, &quot;&quot;) = True Then\r\n    app.Show 'Acrobat\u8868\u793a\r\n    With avdoc.GetPDDoc.GetJSObject\r\n      .getField(&quot;\u6c0f\u540d&quot;).Value = &quot;\u624b\u5de3\u90fd\u3000\u82b1\u5b50&quot;\r\n      With .getField(&quot;\u5e74\u9f62&quot;)\r\n        .Value = &quot;25&quot;\r\n        .ReadOnly = True '\u300c\u5e74\u9f62\u300d\u30d5\u30a3\u30fc\u30eb\u30c9\u3060\u3051\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\u8a2d\u5b9a\r\n      End With\r\n      .getField(&quot;\u9023\u7d61\u5148&quot;).Value = &quot;XXX-XXXX-XXXX&quot;\r\n    End With\r\n    avdoc.GetPDDoc.Save PDSaveFull, &quot;C:\\Test\\PDF\\(\u5165\u529b\u6e08\u307f)\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u30b5\u30f3\u30d7\u30eb.pdf&quot; '\u5225\u540d\u4fdd\u5b58\r\n    avdoc.Close 1 '\u6587\u66f8\u3092\u4fdd\u5b58\u305b\u305a\u306b\u9589\u3058\u308b\r\n    app.Hide: app.Exit\r\n  End If\r\nEnd Sub<\/pre>\n<p><a href=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_01.jpg\" alt=\"\" width=\"1034\" height=\"712\" class=\"alignnone size-full wp-image-14125\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_01.jpg 1034w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_01-300x207.jpg 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_01-1024x705.jpg 1024w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_01-768x529.jpg 768w\" sizes=\"auto, (max-width: 1034px) 100vw, 1034px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_02.jpg\" alt=\"\" width=\"1262\" height=\"810\" class=\"alignnone size-full wp-image-14126\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_02.jpg 1262w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_02-300x193.jpg 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_02-1024x657.jpg 1024w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AcrobatVBA_ReadOnlyField_02-768x493.jpg 768w\" sizes=\"auto, (max-width: 1262px) 100vw, 1262px\" \/><\/a><\/p>\n<p>\u3042\u308b\u3044\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306bAFormApp\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u7d4c\u7531\u3067\u51e6\u7406\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">'AFormApp\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u30d5\u30a3\u30fc\u30eb\u30c9\u64cd\u4f5c\r\nPublic Sub Sample2()\r\n  Dim app As Object\r\n  Dim avdoc As Object\r\n  Const PDSaveFull = &amp;H1\r\n  Const PdfFilePath As String = &quot;C:\\Test\\PDF\\\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u30b5\u30f3\u30d7\u30eb.pdf&quot; 'PDF\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\r\n  \r\n  Set app = CreateObject(&quot;AcroExch.App&quot;)\r\n  Set avdoc = CreateObject(&quot;AcroExch.AVDoc&quot;)\r\n  If avdoc.Open(PdfFilePath, &quot;&quot;) = True Then\r\n    app.Show 'Acrobat\u8868\u793a\r\n    With CreateObject(&quot;AFormAut.App&quot;) 'AFORMAUTLib.AFormApp\r\n      With .Fields\r\n        .Item(&quot;\u6c0f\u540d&quot;).Value = &quot;\u624b\u5de3\u90fd\u3000\u82b1\u5b50&quot;\r\n        With .Item(&quot;\u5e74\u9f62&quot;)\r\n          .Value = &quot;25&quot;\r\n          .IsReadOnly = True\r\n        End With\r\n        .Item(&quot;\u9023\u7d61\u5148&quot;).Value = &quot;XXX-XXXX-XXXX&quot;\r\n      End With\r\n    End With\r\n    avdoc.GetPDDoc.Save PDSaveFull, &quot;C:\\Test\\PDF\\(\u5165\u529b\u6e08\u307f)\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u30b5\u30f3\u30d7\u30eb.pdf&quot; '\u5225\u540d\u4fdd\u5b58\r\n    avdoc.Close 1 '\u6587\u66f8\u3092\u4fdd\u5b58\u305b\u305a\u306b\u9589\u3058\u308b\r\n    app.Hide: app.Exit\r\n  End If\r\nEnd Sub<\/pre>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"\u300cPDF\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5024\u3092\u5165\u529b\u3057\u305f\u5f8c\u3001\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\u3059\u308b\u306b\u306f\u3069\u3046\u3057\u305f\u3089\u826f\u3044\u304b\uff1f\u300d\u3001\u3068\u3044\u3046\u8cea\u554f\u3092\u9802\u304d\u307e\u3057\u305f\u3002 \u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u64cd\u4f5c\u3059\u308b\u30de\u30af\u30ed\u306b\u3064\u3044\u3066\u306f\u3001\u4f55\u5e74\u304b\u524d\u306b\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u3002 Acrobat JavaScript\u306eFi [&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":"[PDF\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\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-14124","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-3FO","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14124","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=14124"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14124\/revisions"}],"predecessor-version":[{"id":14127,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14124\/revisions\/14127"}],"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=14124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}