1

表の境界線の線の太さを設定しようとすると、線の種類が望ましくないものに変更されます。線幅パラメータが線スタイル パラメータに影響するのはなぜですか? 以下の例を参照して、自分で試してみてください。MS Office 2011 Word v14.2.3 を使用しています。

tell application "Microsoft Word"
    set line style of (get border selection which border border bottom) to line width225 point
    get line width of (get border selection which border border bottom)--test:results in line width150. Why? I just set it to line width225!

    --width25 = fine dots
    --width225 = cornered sine wave
    --width50 = dashed line
    --width75 = dash + 3 dots + dash
    --width100 = 3 lines
    --width150 = 2 lines
    --width300 = single
    --width450 = does not work
    --width600 = does not work
end tell

必要な設定を持つテーブルでこれを実行すると、それらが何であるかを確認するために:

tell application "Microsoft Word"
    get properties of (get border selection which border border bottom)
end tell

私は得る:

{class:border, visible:true, color index:no highlight, inside:false, line style:line style single, line width:line width225 point, art style:missing value, art width:missing value, color:{0, 0, 0}, color theme index:no theme color}

どちらが正しい。これらのパラメーターをコピーしてスクリプトを機能させることができるはずですが、線幅 (境界線の太さ) を設定しようとすると何かが起こります。

4

1 に答える 1

1

線の太さを変更したい場合は、のline width代わりにを 使用line styleしてください。そうしないと、期待どおりに機能しないのが普通です。

set line width of (get border selection which border border bottom) to line width225 point

を変更する場合はline style、このリストの値を使用する必要があります:( 線のスタイルなし、線のスタイルの単一、線のスタイルのドット、線のスタイルのダッシュの小さなギャップ、その他多数...)

于 2012-10-07T21:03:57.087 に答える