当我尝试设置表格边框的线条粗细时,结果会将线条类型更改为不需要的东西。为什么线宽参数会影响线型参数?请参阅下面的示例并亲自尝试。我正在使用 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}
哪个是对的。我应该能够复制这些参数以使我的脚本工作,但是当我尝试设置线宽(边框粗细)时会发生一些事情。