»

InDesign + vbscript(その1)

InDesign — enjoji.yasujiro @ 8:50 PM
‘—InDesignの起動
Set myInDesign = CreateObject(”InDesign.Application.CS2_J”)

‘—新規docを開く
Set mydoc = myInDesign.Documents.Add()
mydoc.documentPreferences.pageWidth = “60cm”
mydoc.documentPreferences.pageHeight = “100cm”

‘—docアクティブ化
Set iddoc = myInDesign.ActiveDocument

‘—フレームの追加
Set f = iddoc.textframes.add()

‘—フレームのサイズプロパティ      :top,left,bottom,right
f.GeometricBounds = Array(”50mm”, “20mm”, “100mm”, “50mm”)

‘—フレームに文字列を流し込む
f.contents = “生死去来棚頭傀儡一線断時落落磊磊”

‘—docを閉じる
iddoc.close()

‘—InDesignの終了
myInDesign.Quit()

※参考URL↓
http://www15.ocn.ne.jp/~preopen/iddom/objectmodelf.html

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2009 鎌倉橋日記 | powered by WordPress with Barecity