{"id":8533,"date":"2017-06-02T09:30:18","date_gmt":"2017-06-02T00:30:18","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=8533"},"modified":"2017-06-02T10:27:53","modified_gmt":"2017-06-02T01:27:53","slug":"%e3%80%90illustrator%e3%80%91%e6%8c%87%e5%ae%9a%e3%81%97%e3%81%9fpdf%e3%83%97%e3%83%aa%e3%82%bb%e3%83%83%e3%83%88%e3%81%a7ai%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92pdf%e3%81%ab%e4%b8%80%e6%8b%ac","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=8533","title":{"rendered":"\u3010Illustrator\u3011\u6307\u5b9a\u3057\u305fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3067AI\u30d5\u30a1\u30a4\u30eb\u3092PDF\u306b\u4e00\u62ec\u5909\u63db\u3059\u308bVBScript"},"content":{"rendered":"<p><a href=\"https:\/\/www.ka-net.org\/blog\/?p=8528\" title=\"Illustrator\u306b\u767b\u9332\u3055\u308c\u305fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3092\u5217\u6319\u3059\u308bVBScript | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u3067\u3001Illustrator\u306b\u767b\u9332\u3055\u308c\u305fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3092\u5217\u6319\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u3066\u3001AI\u30d5\u30a1\u30a4\u30eb\u3092PDF\u306b\u4e00\u62ec\u5909\u63db\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f1\u30d5\u30a1\u30a4\u30eb\u3067\u306e\u51e6\u7406\u3067\u3059\u304c\u3001\u4eca\u56de\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3082Illustrator\u304c\u8d77\u52d5\u6e08\u307f\u3067\u3042\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u306e\u3067\u3001Illustrator\u306e\u8d77\u52d5\u304b\u3089\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u7d44\u307f\u8fbc\u3080\u5834\u5408\u306f\u3001\u4e0b\u8a18\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=8522\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Illustrator-120x120.png' alt='Adobe Illustrator\u3092\u64cd\u4f5c\u3059\u308bVBScript' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2017.06.01<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=8522\">Adobe Illustrator\u3092\u64cd\u4f5c\u3059\u308bVBScript <\/a><\/div><div class=\"cardlink_excerpt\">Acrobat\u3068\u540c\u69d8\u306b\u30bf\u30a4\u30d7\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001VBA\u3084VBS\u304b\u3089Illustrator\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\r\n\r\n\u4eca\u56de\u306fIllustrator\u3092\u64cd\u4f5c\u3057\u3066\u65b0\u898f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f5c\u6210\u3001\u6587\u5b57\u3092\u8ffd\u52a0\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\r\n\r\n[vb]Optio...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nDim appAi\r\n\r\nSet appAi = Nothing '\u521d\u671f\u5316\r\nOn Error Resume Next\r\nSet appAi = GetObject(, &quot;Illustrator.Application&quot;)\r\nOn Error GoTo 0\r\nIf appAi Is Nothing Then\r\n  MsgBox &quot;Illustrator\u3092\u8d77\u52d5\u3057\u305f\u72b6\u614b\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;, vbExclamation + vbSystemModal\r\n  Wscript.Quit\r\nEnd If\r\n\r\nAiToPdf appAi, _\r\n        &quot;&#x5B;\u6700\u5c0f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba]&quot;, _\r\n        &quot;C:\\wk\\Sample.ai&quot;, _\r\n        &quot;C:\\wk\\Sample.pdf&quot;\r\n\r\nMsgBox &quot;\u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002&quot;, vbInformation + vbSystemModal\r\n\r\nPrivate Sub AiToPdf(ByVal appAi, ByVal preset_name, ByVal ai_path, ByVal pdf_path)\r\n'AI\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u305fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3067PDF\u5909\u63db\r\n  Dim opt\r\n  Const aiDoNotSaveChanges = 2\r\n  \r\n  Set opt = CreateObject(&quot;Illustrator.PDFSaveOptions&quot;)\r\n  opt.PDFPreset = preset_name 'PDF\u30d7\u30ea\u30bb\u30c3\u30c8\u306e\u6307\u5b9a\r\n  \r\n  '\u4e0b\u8a18\u51e6\u7406\u4e2d\u306b\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\r\n  '\u4e00\u5ea6\u624b\u52d5\u3067PDF\u4fdd\u5b58\u3057\u305f\u5f8c\u3001\u518d\u5ea6\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c\r\n  With appAi\r\n    With .Open(ai_path)\r\n      .SaveAs pdf_path, opt\r\n      .Close aiDoNotSaveChanges\r\n    End With\r\n  End With\r\nEnd Sub<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u3001Illustrator.Application\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eOpen\u30e1\u30bd\u30c3\u30c9\u3067AI\u30d5\u30a1\u30a4\u30eb(Document\u30aa\u30d6\u30b8\u30a7\u30af\u30c8)\u3092\u958b\u304d\u3001SaveAs\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066PDF\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u969b\u3001SaveAs\u30e1\u30bd\u30c3\u30c9\u306e\u7b2c2\u5f15\u6570\u306b\u3088\u3063\u3066\u3001PDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3092\u542b\u3081\u305f\u69d8\u3005\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059(PDFSaveOptions)\u3002<\/p>\n<p>\u500b\u4eba\u7684\u306b\u306f\u3001PDFSaveOptions\u3067\u7d30\u304b\u304f\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u3059\u308b\u3088\u308a\u306f\u3001\u4e8b\u524d\u306bPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3092\u7528\u610f\u3057\u3066\u304a\u3044\u3066\u3001\u305d\u308c\u3092PDFSaveOptions.PDFPreset\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u6307\u5b9a\u3059\u308b\u306e\u304c\u697d\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u74b0\u5883\u306b\u3088\u3063\u3066\u306f\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306b\u306f\u3001\u4e00\u5ea6\u624b\u52d5\u3067AI\u2192PDF\u4fdd\u5b58\u3092\u884c\u3063\u305f\u5f8c\u3001\u6539\u3081\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4 class=\"style4a\">\u6307\u5b9a\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u5185\u306eAI\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u305fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3067\u4e00\u62ec\u5909\u63db\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8<\/h4>\n<p>1\u30d5\u30a1\u30a4\u30eb\u3067\u306ePDF\u5909\u63db\u304c\u78ba\u8a8d\u3067\u304d\u305f\u3089\u3001\u6b21\u306f\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u62ec\u51e6\u7406\u3067\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nDim appAi\r\nDim fol, f\r\nDim fpath\r\n\r\nSet appAi = Nothing: Set fol = Nothing '\u521d\u671f\u5316\r\nOn Error Resume Next\r\nSet appAi = GetObject(, &quot;Illustrator.Application&quot;)\r\nOn Error GoTo 0\r\nIf appAi Is Nothing Then\r\n  MsgBox &quot;Illustrator\u3092\u8d77\u52d5\u3057\u305f\u72b6\u614b\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;, vbExclamation + vbSystemModal\r\n  Wscript.Quit\r\nEnd If\r\n\r\nSet fol = CreateObject(&quot;Shell.Application&quot;) _\r\n          .BrowseForFolder(0, &quot;AI\u30d5\u30a9\u30eb\u30c0\u9078\u629e&quot;, &amp;H10, 0)\r\nIf fol Is Nothing Then Wscript.Quit\r\nfpath = fol.Self.Path\r\n\r\nWith CreateObject(&quot;Scripting.FileSystemObject&quot;)\r\n  If Not .FolderExists(fpath) Then Wscript.Quit\r\n  For Each f In .GetFolder(fpath).Files\r\n    Select Case LCase(.GetExtensionName(f.Path))\r\n      Case &quot;ai&quot; 'AI\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u51e6\u7406\r\n        'AI\u30d5\u30a1\u30a4\u30eb\u3068\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u306bPDF\u30d5\u30a1\u30a4\u30eb\u51fa\u529b\r\n        AiToPdf appAi, _\r\n                &quot;&#x5B;\u6700\u5c0f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba]&quot;, _\r\n                f.Path, _\r\n                AddPathSeparator(.GetParentFolderName(f.Path)) &amp; .GetBaseName(f.Path) &amp; &quot;.pdf&quot;\r\n    End Select\r\n  Next\r\nEnd With\r\n\r\nMsgBox &quot;\u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002&quot;, vbInformation + vbSystemModal\r\n\r\nPrivate Sub AiToPdf(ByVal appAi, ByVal preset_name, ByVal ai_path, ByVal pdf_path)\r\n'AI\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u305fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3067PDF\u5909\u63db\r\n  Dim opt\r\n  Const aiDoNotSaveChanges = 2\r\n  \r\n  Set opt = CreateObject(&quot;Illustrator.PDFSaveOptions&quot;)\r\n  opt.PDFPreset = preset_name 'PDF\u30d7\u30ea\u30bb\u30c3\u30c8\u306e\u6307\u5b9a\r\n  \r\n  '\u4e0b\u8a18\u51e6\u7406\u4e2d\u306b\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\r\n  '\u4e00\u5ea6\u624b\u52d5\u3067PDF\u4fdd\u5b58\u3057\u305f\u5f8c\u3001\u518d\u5ea6\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c\r\n  With appAi\r\n    With .Open(ai_path)\r\n      .SaveAs pdf_path, opt\r\n      .Close aiDoNotSaveChanges\r\n    End With\r\n  End With\r\nEnd Sub\r\n\r\nPrivate Function AddPathSeparator(ByVal s)\r\n  If Right(s, 1) &lt;&gt; ChrW(92) Then s = s &amp; ChrW(92)\r\n  AddPathSeparator = s\r\nEnd Function<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/VBScript_Illustrator_03_01.gif\" alt=\"\" width=\"563\" height=\"503\" class=\"alignnone size-full wp-image-8534\" \/><\/p>\n<p>\u30e1\u30a4\u30f3\u306e\u51e6\u7406\u306f1\u30d5\u30a1\u30a4\u30eb\u306e\u3068\u304d\u3068\u540c\u3058\u3067\u3059\u304c\u3001Shell.BrowseForFolder\u30e1\u30bd\u30c3\u30c9\u3067\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e\u3057\u3001FileSystemObject.GetExtensionName\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066AI\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u3092\u5bfe\u8c61\u3068\u3057\u3066\u5909\u63db\u51e6\u7406\u3092\u884c\u3063\u3066\u3044\u308b\u70b9\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\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<p>Illustrator\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u64cd\u4f5c\u3059\u308b\u5f37\u307f\u306f\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b<span style=\"color: #ff0000; font-weight: bold;\">\u624b\u4f5c\u696d\u3067\u884c\u3046\u306e\u306f\u624b\u9593\u304c\u304b\u304b\u308b\u5b9a\u5f62\u4f5c\u696d\u3092\u81ea\u52d5\u5316\u3067\u304d\u308b\u70b9<\/span>\u306b\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3046\u3044\u3063\u305f\u308f\u3051\u3067\u3001Illustrator\u3067\u6c7a\u307e\u3063\u305f\u4f5c\u696d\u3092\u6bce\u65e5\u30dd\u30c1\u30dd\u30c1\u624b\u4f5c\u696d\u3055\u308c\u3066\u3044\u308b\u65b9\u306f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u3088\u308b\u81ea\u52d5\u5316\u3082\u8003\u3048\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u56de\u306e\u8a18\u4e8b\u3067\u3001Illustrator\u306b\u767b\u9332\u3055\u308c\u305fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3092\u5217\u6319\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u3066\u3001AI\u30d5\u30a1\u30a4\u30eb\u3092PDF\u306b\u4e00\u62ec\u5909\u63db\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u307e\u305a\u306f1\u30d5\u30a1\u30a4\u30eb\u3067\u306e\u51e6\u7406 [&hellip;]","protected":false},"author":1,"featured_media":8523,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[\u3010Illustrator\u3011\u6307\u5b9a\u3057\u305fPDF\u30d7\u30ea\u30bb\u30c3\u30c8\u3067AI\u30d5\u30a1\u30a4\u30eb\u3092PDF\u306b\u4e00\u62ec\u5909\u63db\u3059\u308bVBScript]","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":[6,151],"tags":[],"class_list":["post-8533","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vbs","category-illustrator"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Illustrator.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-2dD","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8533","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=8533"}],"version-history":[{"count":2,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8533\/revisions"}],"predecessor-version":[{"id":8536,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8533\/revisions\/8536"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/8523"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}