2012-10-07 5 views
1

표 테두리의 선 두께를 설정하려고하면 결과에 따라 선 종류가 바람직하지 않은 것으로 변경됩니다. 선폭 매개 변수가 선 스타일 매개 변수에 영향을주는 이유는 무엇입니까? 아래 예제를보고 직접 사용해보십시오. MS Office 2011 Word v14.2.3을 사용 중입니다.AppleScript를 사용하여 Mircrosoft Word에서 표 테두리 설정

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} 

올바른 어느

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 

나는 그들이 무엇을 참조하기 위해, 내가 원하는 설정이있는 테이블에서이 작업을 실행하는 경우 . 스크립트 작업을 위해 이러한 매개 변수를 복사 할 수 있어야하지만 선 두께 (테두리 두께)를 설정하려고하면 문제가 발생합니다.

답변

1

줄 두께를 변경하려면 line style 대신 line width을 사용하십시오. 그렇지 않으면 예상 한대로 작동하지 않는 것이 정상입니다.

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

당신이 line style을 변경하려는 경우, 당신이 목록에서 값을 사용한다 : ( 선 스타일 없음, 하나의 선 스타일, 선 스타일의 점, 선 스타일 대시 작은 간격, 많은 더보기 ...)

+0

고마워요! 나는 실제로 당신의 대답을 보지 않고 오늘 누군가가 그것을보기 전에 나의 질문을 삭제하기를 바랐다는 것을 알아 차렸다 ... 그러나 아니, 당신은 이미 그것을 보았습니다. 오 잘. 감사합니다 :)이 줄을 누군가가 도움이되기를 바랍니다. 나는 테이블의 너비로 어떻게 조정하는지 알고 싶습니다. 그러나 나는 그것을 또 다른 질문으로 만들 것입니다. –