* (2026.1.26)「ファイルプレビュー用に許可されたフォントを埋め込む」保存オプションは、ESTK(Illustrator JavaScript)に非対応です
* (2026.1.23)起動Illustratorバージョンをv28→v29(2025)に修正しました
Geminiさんに書いてもらいました、vbsドロップレットです。嗚呼、堕落の始まり(今さら)
この辺を一気に調べて、メッセージウインドウ or テキスト形式でデスクトップに保存します。


v29.3から搭載された「ファイルプレビュー用に許可されたフォントを埋め込む」についてはAdobe JavaScript(Extend Script)に関数非搭載な可能性が高いため、Illustratorの作成バージョンを記載するぐらいしかないとGeminiさんは言っております。
- Windows 10,11(vbs)ドロップレット形式
- メモ帳にペーストし、「エンコード=ANSI」で.txt保存→ 拡張子を.vbsに変更して下さい
- Illustrator ai、Illustrator EPS対応
- Illustratorインストール必須(cc以前は動作保障できません)
- Illustratorが起動・ドキュメントを開きます ※最後の「テキスト書き出し」後まで閉じないで下さい
- ESTKで調べた後、vbsに引き渡しています
- 記述内は「Illustrator v.29」で開く指定をしていますが、場合によって上位バージョンで開いたりもします(原因不明)
- あまりにも古い保存バージョンの場合、動作を保障しません
AppleScript版も書かせてみたいのですが(書けるのか?Gemini)Mac版CS6以上のチェック環境を持たないので、もし次回アップできたら、お暇な方は動作チェックヨロシコです。
Illustrator不要版も作れますが、ロクな情報を引き出せず役に立たないのでボツにしました。
* CheckAiOptions_単
* CheckAiOptions_複 テキスト保存結果
環境にないフォントのプレビュー、追加、または置換
helpx.adobe.com目次
※ドキュメント1枚版(最初にメッセージとして表示)
複数ドキュメント対応(メッセージなし)
CheckAiOptions_単
Option Explicit
Dim objArgs, i, appRef, fso, shell
Set objArgs = WScript.Arguments
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
' 1. ファイルチェック
If objArgs.Count = 0 Then
MsgBox "Illustratorファイルをドロップしてください。", vbExclamation, "使い方"
WScript.Quit
End If
' 2. Illustratorの取得
On Error Resume Next
Set appRef = GetObject(, "Illustrator.Application")
If Err.Number <> 0 Then
Err.Clear
Set appRef = CreateObject("Illustrator.Application.29") ' 2025
End If
If Err.Number <> 0 Then
Err.Clear
Set appRef = CreateObject("Illustrator.Application")
End If
On Error GoTo 0
If appRef Is Nothing Then
MsgBox "Illustratorを起動できませんでした。", vbCritical
WScript.Quit
End If
' ★警告を一時的に抑制(JavaScript経由で確実に実行)
appRef.DoJavaScript "app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;"
' 3. ファイル処理
For i = 0 To objArgs.Count - 1
ProcessFile objArgs(i)
Next
' ★警告設定を元に戻す
appRef.DoJavaScript "app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;"
Sub ProcessFile(filePath)
Dim docRef, msg, jsCode, detailedInfo, btnSelect, desktopPath, logFile, ts
' ファイルを開く
On Error Resume Next
Set docRef = appRef.Open(filePath)
If Err.Number <> 0 Then
MsgBox "ファイルを開けませんでした: " & filePath, vbCritical
Exit Sub
End If
On Error GoTo 0
' 4. JavaScriptを注入して情報を取得
jsCode = "function analyzeDoc(){" & _
" var d = app.activeDocument;" & _
" var o = new IllustratorSaveOptions();" & _
" var info = [];" & _
" var getProp = function(p){ try{ return p(); }catch(e){ return '取得失敗'; } };" & _
" /* バージョン情報の取得 */" & _
" var getCreator = function(){" & _
" try {" & _
" var xmp = d.XMPString;" & _
" var reg = /<xmp:CreatorTool>(.*?)<\/xmp:CreatorTool>/;" & _
" var match = xmp.match(reg);" & _
" return match ? match[1].replace('Adobe Illustrator ', '') : '不明';" & _
" } catch(e) { return '不明'; }" & _
" };" & _
" var getCompat = function(){" & _
" try { return o.compatibility.toString().replace('Compatibility.ILLUSTRATOR', 'AI '); } catch(e) { return '不明'; }" & _
" };" & _
" /* 情報の蓄積 */" & _
" info.push('作成バージョン: ' + getCreator());" & _
" info.push('保存形式形式: ' + getCompat());" & _
" info.push('カラーモード: ' + getProp(function(){ return (d.documentColorSpace == DocumentColorSpace.CMYK) ? 'CMYK' : 'RGB'; }));" & _
" info.push('ラスタライズ効果: ' + getProp(function(){ return d.rasterEffectSettings.resolution + ' ppi'; }));" & _
" info.push('配置・埋込画像数: ' + getProp(function(){ return d.placedItems.length + d.rasterItems.length; }) + ' 個');" & _
" info.push('--------------------------------');" & _
" info.push('■保存設定');" & _
" info.push('PDF互換ファイル作成: ' + getProp(function(){ return o.pdfCompatible ? 'ON' : 'OFF'; }));" & _
" info.push('圧縮を使用: ' + getProp(function(){ return o.compressed ? 'ON' : 'OFF'; }));" & _
" info.push('ICCプロファイルを埋め込み: ' + getProp(function(){ return o.embedICCProfile ? 'ON' : 'OFF'; }));" & _
" info.push('配置した画像を含む: ' + getProp(function(){ return o.embedLinkedFiles ? 'ON' : 'OFF'; }));" & _
" info.push('フォントサブセット: ' + getProp(function(){ return o.fontSubsetThreshold + '%'; }));" & _
" var eFonts = ('embedFonts' in o) ? (o.embedFonts ? 'ON' : 'OFF') : 'このスクリプトは非対応です';" & _
" info.push('ファイルプレビュー用フォントの埋込: ' + eFonts);" & _
" return info.join('\n');" & _
"}" & _
"analyzeDoc();"
detailedInfo = appRef.DoJavaScript(jsCode)
' 5. メッセージの組み立て
msg = "【AIファイル内部解析結果】" & vbCrLf & _
"ファイル名: " & docRef.Name & vbCrLf & _
"--------------------------------" & vbCrLf & _
detailedInfo & vbCrLf & vbCrLf & _
"この結果をテキストファイルとしてデスクトップに保存しますか?"
' 6. Confirm (はい/いいえ) の表示
btnSelect = MsgBox(msg, 4 + 32 + 256, "解析完了 - v29.3対応")
' 「はい」が押された場合のみ保存処理
If btnSelect = 6 Then
desktopPath = shell.SpecialFolders("Desktop")
logFile = desktopPath & "\Illustrator解析結果.txt"
Set ts = fso.OpenTextFile(logFile, 8, True)
ts.WriteLine "================================"
ts.WriteLine "解析日時: " & Now
ts.WriteLine "ファイルパス: " & filePath
ts.WriteLine "--------------------------------"
ts.WriteLine detailedInfo
ts.WriteLine "================================" & vbCrLf
ts.Close
shell.Run "notepad.exe " & logFile
End If
' 保存せずに閉じる
docRef.Close 2
End Sub
CheckAiOptions_複
Option Explicit
Dim objArgs, i, appRef, fso, shell, logContent
Set objArgs = WScript.Arguments
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
If objArgs.Count = 0 Then
MsgBox "Illustratorファイルをドロップしてください。", vbExclamation, "使い方"
WScript.Quit
End If
' Illustrator取得
On Error Resume Next
Set appRef = GetObject(, "Illustrator.Application")
If Err.Number <> 0 Then
Err.Clear
Set appRef = CreateObject("Illustrator.Application.29")
End If
If Err.Number <> 0 Then
Err.Clear
Set appRef = CreateObject("Illustrator.Application")
End If
On Error GoTo 0
' 警告抑制
appRef.DoJavaScript "app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;"
' ヘッダー設定(「作成Ver」と「保存形式Ver」を分離)
logContent = "解析日時" & vbTab & "ファイル名" & vbTab & "作成Ver" & vbTab & "保存形式Ver" & vbTab & "カラーモード" & vbTab & "ラスタライズ効果" & vbTab & "配置画像数" & vbTab & "PDF互換" & vbTab & "圧縮" & vbTab & "ICC埋込" & vbTab & "画像埋込" & vbTab & "フォントサブセット" & vbTab & "ファイルプレビュー用フォントの埋込(v29.3~)" & vbCrLf
For i = 0 To objArgs.Count - 1
Dim path: path = objArgs(i)
If fso.FolderExists(path) Then
ProcessFolder path
ElseIf fso.FileExists(path) Then
If LCase(fso.GetExtensionName(path)) = "ai" Then
ProcessFile path
End If
End If
Next
' 警告設定を戻す
appRef.DoJavaScript "app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;"
' 結果の保存
If logContent <> "" Then
Dim btnSelect, desktopPath, logFile, ts
btnSelect = MsgBox("解析完了しました。保存しますか?", 4 + 32, "処理完了")
If btnSelect = 6 Then
desktopPath = shell.SpecialFolders("Desktop")
logFile = desktopPath & "\Illustrator解析結果.txt"
Set ts = fso.OpenTextFile(logFile, 2, True)
ts.Write logContent
ts.Close
shell.Run "notepad.exe " & logFile
End If
End If
Sub ProcessFolder(folderPath)
Dim folder, file
Set folder = fso.GetFolder(folderPath)
For Each file In folder.Files
If LCase(fso.GetExtensionName(file.Path)) = "ai" Then
ProcessFile file.Path
End If
Next
End Sub
Sub ProcessFile(filePath)
Dim docRef, jsCode, resultText
On Error Resume Next
Set docRef = appRef.Open(filePath)
If Err.Number <> 0 Then Exit Sub
On Error GoTo 0
' JavaScriptで詳細解析
jsCode = "function analyze(){" & _
" var d = app.activeDocument;" & _
" var o = new IllustratorSaveOptions();" & _
" var info = [];" & _
" var getProp = function(p){ try{ return p(); }catch(e){ return '取得失敗'; } };" & _
" /* 1. 作成バージョン (CreatorTool) */" & _
" var getCreator = function(){" & _
" try {" & _
" var xmp = d.XMPString;" & _
" var reg = /<xmp:CreatorTool>(.*?)<\/xmp:CreatorTool>/;" & _
" var match = xmp.match(reg);" & _
" return match ? match[1].replace('Adobe Illustrator ', '') : '不明';" & _
" } catch(e) { return '取得エラー'; }" & _
" };" & _
" /* 2. 保存形式バージョン (Compatibility) */" & _
" var getCompat = function(){" & _
" try {" & _
" return o.compatibility.toString().replace('Compatibility.ILLUSTRATOR', 'AI ');" & _
" } catch(e) { return '不明'; }" & _
" };" & _
" info.push(getCreator());" & _
" info.push(getCompat());" & _
" info.push(getProp(function(){ return (d.documentColorSpace == DocumentColorSpace.CMYK) ? 'CMYK' : 'RGB'; }));" & _
" info.push(getProp(function(){ return d.rasterEffectSettings.resolution + ' ppi'; }));" & _
" info.push(getProp(function(){ return d.placedItems.length + d.rasterItems.length; }));" & _
" info.push(getProp(function(){ return o.pdfCompatible ? 'ON' : 'OFF'; }));" & _
" info.push(getProp(function(){ return o.compressed ? 'ON' : 'OFF'; }));" & _
" info.push(getProp(function(){ return o.embedICCProfile ? 'ON' : 'OFF'; }));" & _
" info.push(getProp(function(){ return o.embedLinkedFiles ? 'ON' : 'OFF'; }));" & _
" info.push(getProp(function(){ return o.fontSubsetThreshold + '%'; }));" & _
" var eFonts = ('embedFonts' in o) ? (o.embedFonts ? 'ON' : 'OFF') : 'このスクリプトは非対応です';" & _
" info.push(eFonts);" & _
" return info.join('\t');" & _
"}" & _
"analyze();"
resultText = appRef.DoJavaScript(jsCode)
logContent = logContent & Now & vbTab & fso.GetFileName(filePath) & vbTab & resultText & vbCrLf
docRef.Close 2
End Sub
テキスト書き出し後、Illustratorドキュメントは自動で閉じます。









