# 현재 커서 위치의 스타일 이름 가져오는 방법?

**URL:** <https://forum.developer.hancom.com/t/topic/1929>\
**Category:** 한글 오토메이션\
**Created:** [11월 9, 2024, 9:19오전 UTC](https://forum.developer.hancom.com/t/topic/1929 "2024-11-09T09:19:44Z")\
**Posts on this page:** 3\
**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:** [11월 9, 2024, 9:19오전 UTC](https://forum.developer.hancom.com/t/topic/1929/1 "2024-11-09T09:19:44Z")

</div>

안녕하세요?

현재 커서 위치의 스타일 이름을 가져올 수 있는 방법이 있나요?

예를 들어 문서 시작 위치의 스타일 이름이 “바탕글” 이라면

string style\_name = hwp.GetStyleName();

이런식으로요…

---

<div class="post-metadata">

**Author:** ![jhbang](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jhbang](https://forum.developer.hancom.com/u/jhbang)\
**Post date:** [11월 11, 2024, 12:06오전 UTC](https://forum.developer.hancom.com/t/topic/1929/2 "2024-11-11T00:06:18Z")

</div>

안녕하세요.

문의하신 현재 위치의 스타일 이름을 가져오는 API는 없습니다.

현재는 제공할 수는 없으나  
스타일 이름이 필요한 이유를 설명주시면 관련 API를 검토해보겠습니다.

- 스타일 이름이 같더라도 스타일이 가지는 모양은 문서마다 다를 수 있어서 용도를 알면 취지를 살려 개발 검토가 가능할 것 같음

감사합니다.

---

<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:** [11월 11, 2024, 6:07오전 UTC](https://forum.developer.hancom.com/t/topic/1929/3 "2024-11-11T06:07:27Z")

</div>

스타일별로 편집을 자동으로 할려고 하는데요  
예를 들어

a 스타일이면 단락 테두리를 넣고  
b 스타일이면 글자 색상을 다르게 하고

등등 스타일 이름에 따라서 단락을 자동으로 편집하려고 합니다.

인덱스 번호만으로는 스타일이 추가되거나 삭제될 경우 문제가 생길 수 있어서  
이름을 기준으로 했으면 해서요
