Vertical Address Scripting Tips 4 of 5          —宛名の縦書き Tipsパート4— 

26 11月

nogtips --- Vertical Scripting Tips 4 ---
This is #4 of 5 series Tips about the vertically address scripting
(wiki : Horizontal and vertical writing in East Asian scripts).
To use this tips, it is necessary that you have a Japanese version of Adobe InDesign because it use one of the build-in feature of that only available in Japanese version of Adobe InDesign.

As basic knowledge and tips of the vertical address scripting, please refer to my old post regarding the vertical address scripting.

これは宛名の縦組みに関するTipsシリーズのパート4です。本Tipsの使用は日本語版のAdobe InDesign使用を前提としています。


How to lay out the recipient name looking nicely when it should be joint signature.


This tips if for user who have below request.

  • Lay out multiple recipient name looks nicely, especially when the database contain not only full name, but also only first name as second name that should be displayed.
  • 氏名・名のみなどのレコードが混在するデータベース使用時に、宛名の連名表記を見栄え良く表示したい

Preview of the problematic text display :

Vertical Scripting Tips 4 Preview 1

Preview 1 : Full Name for main recipient and Full Name for second recipient.
As you can see, it’s no problem at all. Both text fit into text frame, and was adjusted accordingly by Adobe InDesign text frame setting.

ご覧のとおり、何の問題もありません。どちらの宛名もAdobe InDesignのテキストフレームの設定に従って表示されています。

Vertical Scripting Tips 4 Preview 2

Preview 2 : Full Name for main recipient and only First Name for second recipient.
As you can see, it looks not nice, especially for second recipient’s name. It because this text frame have been set with “Full Justification” in vertically.


Vertical Scripting Tips 4 Preview 3

Preview 3 : Full Name for main recipient and only First Name for second recipient. (nogtips version)
This looks much better than above one. So we added additional space key in front of second recipient’s first name. So it start to describe her name almost same position of mail recipient’s first name.


What you can achieve with this tip?


This tips make you able to display a join signature with nice-looking. Especially, when your database contain second name that should be a part of the joint signature as recipient name even those name is full-name, or just only first name.(It because if you assign the second name to text frame, the looking of those text frame is not good when it only have first name, because it will start to describing from the top, although other name start from Last name + First name)


Preview :

Vertical Scripting Tips 4 Preview 4
With this tips, even your database contain both type of name as second recipient name(Full name or only First name), it can display the recipient name with nice-looking.



Please refer to former post of this series regarding basic setting.


  1. Create variables at outside of page layout. Those variables will be used for script.
    Actual database looks like below.
    Vertical Scripting Tips 4 Database
  2. Create text frame for vertically scripting.
    宛名用に縦組みのテキストフレームを作成します。Vertical Scripting Tips 4 Text Frame 1

    You should check maximum characters that can be displayed vertically by this text frame. I checked it by using “circle” instead of typing character. And this text frame can display 10 characters as vertical maximum number.(It’s just for checking, so you can remove those circles after you check it)With this text frame, you need to set “Full Justification” as type setting.


    Vertical Scripting Tips 4 Text Frame 2

  3. Register all frames in DSM-Bridge as variable element.
  4. Setup for each variables :
    All variable should have assignment like below.


    Vertical Scripting Tips 4 Variable Assignment - FullName

    Vertical Scripting Tips 4 Variable Assignment - Name1
    Because both of them will be used as recipient name, so I addes “様” as title oh honor in the end of their name.


  5. Edit VBScript
    Let’s edit vbscript. I made script that named as “Vertical Script3”. Here is the entire of script code.

    Vertical Scripting Tips 4 Variable Assignment -VBScript

    function JointSignatureScript()
    	Dim firstName, secondName, secondWithSal, spacekey, Cnt, work, work2, aspace, secondFullText
    	firstName = RS("氏名")
    	secondWithSal = RS("連名用")
    	spacekey=" "
    	work=InStr(firstName, spacekey)
    	work2 = InStr(secondName, spacekey)
    	If work2 <> 0 Then
    		Var.PutS "JSign01", secondWithSal
    		JointSignatureScript = secontWithSal
    		aspace = String(work, spacekey)
    		secondFullText = aspace & secondWithSal
    		Var.PutS "JSign01", secondFullText
    		JointSignatureScript = secondFullText
    	End If
    End function
  6. Edit variable property :
    The last thing and most important is to specify the order of variable process. If you don’t set it, or set wrong order, you will get unexpected result or simply it won’t work. Please set correct order depends on your variable assignment and script that you set.
    最後にして、一番重要なTipsはバリアブルに対する「値を受け取る順序設定」です。この設定が正しくない、正しい順序で設定されていない場合は、予期せぬ表示結果を得る可能性があります。ですので、確実に順序立てて値を受け取れるように各バリアブルに対してプロパティを設定していきます。Vertical Scripting Tips 4 Process Order -VBScript
    Vertical Scripting Tips 4 Process Order -Recipient Name -TextFrame

    Here is the exactly order in this sample.

    “Full_Name” = 1
    “Name1” = 1
    “Script” = 2
    “JSgin01” = 3

Output Preview

Vertical Scripting Tips 4 Output PDF Preview


タグ: , , , , , , , , , , , ,


以下に詳細を記入するか、アイコンをクリックしてログインしてください。 ロゴ アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中