# 질문 입니다.

**URL:** <https://forum.developer.hancom.com/t/topic/2711>\
**Category:** 한글 오토메이션\
**Created:** [8월 28, 2025, 6:03오전 UTC](https://forum.developer.hancom.com/t/topic/2711 "2025-08-28T06:03:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kosohn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/kosohn/32/2313_2.png) [@kosohn](https://forum.developer.hancom.com/u/kosohn)\
**Post date:** [8월 28, 2025, 6:03오전 UTC](https://forum.developer.hancom.com/t/topic/2711/1 "2025-08-28T06:03:23Z")

</div>

안녕하세요.

아래 코드(매크로 코드) 실행하면 5, 7, 9 같은 정숫값이 나옵니다.

파일 이름(경로)이 나와야 하는 게 아닌가 해서요.

```auto
function OnScriptMacro_script4()
{
	var ctrl = HeadCtrl;
	var mySet, mySubSet;
	while (ctrl != null)
	{
		if (ctrl.UserDesc == "그림")
		{
			mySet = ctrl.Properties;
			mySubSet = mySet.Item("ShapeDrawImageAttr");
			XHwpMessageBox.String = mySubSet.Item("FileName");
			XHwpMessageBox.DoModal();
		}
		ctrl = ctrl.Next;
	}
}

```

 ![화면 캡처 2025-08-28 150221](https://us1.discourse-cdn.com/flex016/uploads/hancom_dev_forum/original/2X/b/bb10b66f4716f1ece32c7f7cc879ffc5fe1447a3.png)

---

<div class="post-metadata">

**Author:** ![ygyoun](https://avatars.discourse-cdn.com/v4/letter/y/b4bc9f/32.png) [@ygyoun](https://forum.developer.hancom.com/u/ygyoun)\
**Post date:** [9월 1, 2025, 2:04오전 UTC](https://forum.developer.hancom.com/t/topic/2711/2 "2025-09-01T02:04:17Z")

</div>

안녕하세요

FileName은 BinData ID로 넘어오네요 ㅠㅠ 담당팀에 수정 요청하겠습니다.

잘 아시겠지만 FileName를 가져오려면 넘어온 BinData ID를 GetBinDataPath에 넣어주면 됩니다.

감사합니다.

---

<div class="post-metadata">

**Author:** ![kosohn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/kosohn/32/2313_2.png) [@kosohn](https://forum.developer.hancom.com/u/kosohn)\
**Post date:** [9월 1, 2025, 3:38오전 UTC](https://forum.developer.hancom.com/t/topic/2711/3 "2025-09-01T03:38:25Z")

</div>

답변 감사합니다.

질문과 관련하여 하나만 더 질문 드릴게요.

binid를 가져오는 방법을 잘 모르겠습니다.

예를 들어 문서에 들어있는 그림 파일의 binid는 어떻게 가져올 수 있나요?

 ![화면 캡처 2025-09-01 123556](https://us1.discourse-cdn.com/flex016/uploads/hancom_dev_forum/original/2X/1/1c1b5743e3db6c623c17fb63c4cd05d7d9e87b9e.png)

---

<div class="post-metadata">

**Author:** ![ygyoun](https://avatars.discourse-cdn.com/v4/letter/y/b4bc9f/32.png) [@ygyoun](https://forum.developer.hancom.com/u/ygyoun)\
**Post date:** [9월 1, 2025, 4:18오전 UTC](https://forum.developer.hancom.com/t/topic/2711/4 "2025-09-01T04:18:22Z")

</div>

한글 내부적으로 이미지를 관리할 때 사용하는 ID입니다.

현재는 이미지 속성의 FileName은 삽입할 때만 파일 이름으로 사용하지만, 문서에서 조회할 때는 Binid로 가져옵니다.

---

<div class="post-metadata">

**Author:** ![kosohn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/kosohn/32/2313_2.png) [@kosohn](https://forum.developer.hancom.com/u/kosohn)\
**Post date:** [9월 1, 2025, 4:23오전 UTC](https://forum.developer.hancom.com/t/topic/2711/5 "2025-09-01T04:23:50Z")

</div>

binid 가져오기는 다른 방법이 있는 게 아니라

현 방법대로 FileName으로 binid를 가져올 수 있는 거군요.

답변 감사합니다.
