# 오토메이션으로 쪽 테리 없애는 방법?

**URL:** <https://forum.developer.hancom.com/t/topic/1147>\
**Category:** 한글 오토메이션\
**Created:** [12월 8, 2023, 5:08오전 UTC](https://forum.developer.hancom.com/t/topic/1147 "2023-12-08T05:08:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nuristar](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@nuristar](https://forum.developer.hancom.com/u/nuristar)\
**Post date:** [12월 8, 2023, 5:08오전 UTC](https://forum.developer.hancom.com/t/topic/1147/1 "2023-12-08T05:08:15Z")

</div>

안녕하세요?

c#으로 오토메이션 하는 중에 의문사항 있어서 질문 드립니다.

쪽 테두리 배경을 없애고 싶은데

아래한글에서 스크립트로 녹화하면

```auto
function OnScriptMacro_쪽테두리삭제()
{
	HAction.GetDefault("PageBorder", HParameterSet.HSecDef.HSet);
	with (HParameterSet.HSecDef)
	{
		HSet.SetItem("ApplyToPageBorderFill", 3);
	}
	HAction.Execute("PageBorder", HParameterSet.HSecDef.HSet);
}

```

이렇게 코드가 나오는데 스크립트를 실행해도 쪽 테두리 선이 안없어지는데 어떻게 수정해야 할까요?  
HSet.SetItem이 뭔가가 더 추가되어야 할듯한데… 감이 안오네요 ㅠㅠ

아… 다시 하니까… 코드가 더 추가되네요. 제가 스크립트 녹화하면서 뭔가 빼먹었나봐요 ㅎ

```auto
function OnScriptMacro_쪽테두리삭제()
{
	HAction.GetDefault("PageBorder", HParameterSet.HSecDef.HSet);
	with (HParameterSet.HSecDef)
	{
		PageBorderFillBoth.BorderTypeLeft = HwpLineType("None");
		PageBorderFillBoth.BorderTypeRight = HwpLineType("None");
		PageBorderFillBoth.BorderTypeTop = HwpLineType("None");
		PageBorderFillBoth.BorderTypeBottom = HwpLineType("None");
		HSet.SetItem("ApplyToPageBorderFill", 3);
	}
	HAction.Execute("PageBorder", HParameterSet.HSecDef.HSet);
}

```

이렇게 하니까 되네요 급한마음에 올렸다가… 죄송합니다.

---

<div class="post-metadata">

**Author:** ![bhjung](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/bhjung/32/259_2.png) [@bhjung](https://forum.developer.hancom.com/u/bhjung)\
**Post date:** [12월 8, 2023, 6:14오전 UTC](https://forum.developer.hancom.com/t/topic/1147/2 "2023-12-08T06:14:59Z")

</div>

안녕하세요 ^^  
적용하려는 테두리 방향 설정이 안되서 녹화된것 같습니다.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/hancom_dev_forum/original/1X/7f5649fd22966eba3353a4733ec6e78426a9fd7f.png)

감사합니다
