네이버 국어사전/영어사전 검색 도구_v1.02_20240201
한 가지 기능을 추가한 “네이버 국어사전/영어사전 검색 도구_v1.02_20240201″을 배포한다. 검색어에 오타가 있는 경우 결과를 출력하는 방식을 옵션으로 추가하고 이 옵션에 따라 출력하도록 기능을 추가했다.
네이버 국어사전, 영어사전 검색 도구 개요와 사용 방법은 아래 글에 정리되어 있다.
1. 요청사항
이번 주 화요일(2024-01-30)에 다음과 같은 댓글이 등록됐다.
* 댓글 URL: https://prodskill.com/naver-korean-english-dictionary-search-tool-update-20220708/#comment-387
2. 반영내용
2.1. 검색어와 다른 결과가 보여지는 경우 예시
네이버 사전 검색어에 오타가 있으면, 가장 근접한 단어의 검색결과를 표시한다. 예를 들어 “preimium”을 검색하면 다음과 같이 제안 내용에 “premium에 대한 검색 결과입니다.”로 표시되고 premium의 검색결과가 보여진다.
이 때 Http Response JSON 파일의 내용에 다음과 같은 데이터가 포함되어 있음을 확인했다.
2.2. 옵션 추가 및 기능 추가
다음과 같이 “실제 검색어와 달라도 결과 표시” 옵션을 추가했다.
이 옵션이 선택된 상태에서는 이전 버전(v1.01)과 동일하게 결과가 표시되고, 선택하지 않은 상태에서는 결과에 “#NOT FOUND#”가 표시되도록 기능을 추가했다.
도움말 내용도 다음과 같이 옵션에 대한 설명을 추가했다.

2.3. 실행 결과 예시
“실제 검색어와 달라도 결과 표시” 옵션을 선택하고 실행하면 이전 버전(v1.01)과 동일하게 검색 결과는 표시되고, H열(“실제 검색어”)에 결과 표시 검색어를 추가로 출력한다.
“실제 검색어와 달라도 결과 표시” 옵션을 선택하지 않고 실행하면 검색 결과에는 “#NOT FOUND#”로 출력한다, H열(“실제 검색어”)에 결과 표시 검색어를 추가로 출력하는 것은 옵션과 상관없이 항상 출력한다.
3. 다운로드
아래 github에서 “네이버 국어사전,영어사전 검색 도구_v1.02_20240201.xlsm” 파일을 선택하여 다운 받거나,
https://github.com/DAToolset/ToolsForDataStandard
또는 이 URL로 바로 다운로드할 수 있다.
https://github.com/DAToolset/ToolsForDataStandard/blob/main/네이버 국어사전 영어사전 검색 도구_v1.02_20240201.xlsm
안녕하세요 선생님 덕분에 영어공부 하는데 많은 도움이 되어 정말 감사합니다. 다름이 아니라 혹시 이렇게 개조해보려 하는데 가능한지 여쭙고 싶습니다.
영단어는 제 1 뜻 뿐만 아니라 2 3 4 5 6의 뜻도 중요한데, 파싱되어오는 옥스퍼드 사전의 경우 많은 경우 제 3 4 5 6 뜻이 빠져있거나 동사의 의미도 있는데 명사형의 뜻만 표기 되는 등 사실 동아출판이나 슈프림 등 사전을 한번 더 봐야 하는 경우가 있습니다.
맨 오른쪽 란에 등급별 뜻보기가 있는데 이걸로 보면 제 1~ 이상의 뜻을 한꺼번에 볼 수 있는데 이 등급별 뜻보기의 뜻을 긁어올 수 있게 사용이 가능한지 여쭙고 싶습니다.
항상 감사합니다. 저도 이제 막 참 vba 공부를 시작했습니다. 항상 여쭤보는게 죄송하기도 하여서. 감사합니다.
안녕하세요, 반갑습니다.
좋은 의견 감사합니다.
“등급별 뜻보기” 내용을 가져올 수 있는지는 테스트를 해봐야 알 수 있겠네요.
제가 요즘 시간 내기가 무척 어려운 상황이라 조금 걸릴 듯 합니다.
테스트해보고 가능한지 파악하여 댓글 남겨두겠습니다.
감사합니다. 선생님. 제가 이제 막 VBA를 배우는 초보유저라서 번거롭게 해드렸네요. 고려해주셔서 정말 감사합니다. 편하실 때 부탁드리겠습니다.
I apologize in advance if you find it a bit difficult to understand, because my English is very bad.
Hello, your tool is really suitable for my situation. But I still don’t understand why when I use version v1.02 an error message appears, it is here:
Run-time error ‘1004’
Method ‘Range’ of object ‘_Worksheet’ failed.
At first I thought it was because the new version had an error, so I redownloaded version v1.01 and the error was the same. As for the message, in debug mode it points to this command line:
Dim sWord As String, oKorDicSearchResult As TDicSearchResult, oEngDicSearchResult As TDicSearchResult
Dim oBaseRange As Range
Set oBaseRange = Range(“검색결과Header”).Offset(1, 0) [it points here]
oBaseRange.Select
Can you show me where the error is and how to fix it?
Perhaps the problem is in the “Range(”검색결과Header“)” part.
This syntax means “named range” in Excel, and I’m guessing that the name of the range written in Korean is causing the error on your computer.
Try this
1. in Excel, click the “Edit” button at the top of the “Name Manager” window that appears when you press Ctrl+F3, and change the name to “Header”
2. change the part of the VBA code where the error occurs to the following
– Before: Range(“검색결과Header”)
– After: Range(“Header”)
Hope this works for you.
And please post comment when it works.
I am using a modern version of Microsoft 365 on an English-language version of Windows 11 and ran into a couple of issues.
1. ActiveX controls being disabled by default in new versions of Excel.
My command buttons and checkboxes were not working because Microsoft now disables ActiveX controls by default for security.
I added the file’s location to Excel’s “Trusted Locations.”
Go to File > Options > Trust Center > Trust Center Settings… > Trusted Locations.
Add the folder containing the Excel file to the list.
Restart Excel.
2. Errors caused by language/character encoding differences between Korean and non-Korean systems.
The VBA code would stop or crash because my English version of Excel couldn’t understand some of the hard-coded Korean text, especially the Named Range.
As suggested by Zerom, I went to Formulas > Name Manager and edited the name 검색결과Header to be an English-friendly name like ResultHeader.
Then, I updated the two lines in the VBA code that refer to it:
Original Code:
Generated vba
Set oBaseRange = Range(“검색결과Header”).Offset(1, 0)
Set oBaseRange = Range(“검색결과Header”)
My Change:
Generated vba
Set oBaseRange = Range(“ResultHeader”).Offset(1, 0)
Set oBaseRange = Range(“ResultHeader”)
Next, I replaced the Korean text in message boxes and hyperlinks with English so they would display correctly.
Example 1 (Message Box):
Original: MsgBox “사전 검색을 시작하시겠습니까?”
My Change: MsgBox “Start dictionary search?”
Example 2 (Hyperlink Text):
Original: TextToDisplay:=”네이버국어사전 열기: ” & .sLinkWord
My Change: TextToDisplay:=”Open Naver Korean Dic: ” & .sLinkWord
After making these changes, the tool works perfectly on my English version of Office. Thank you again for your hard work on this project. I hope this information is helpful for others
Oh… there was a problem with the English version of Excel not working properly.
I’m glad you were able to solve it yourself. Thank you very much for sharing the solution!
I will fix it in the next version by changing the Korean code.
— Korean
아… 영어 버전 엑셀에서 잘 동작하지 않는 문제가 있었군요.
스스로 잘 해결하셔서 다행이고, 해결한 내용을 공유해 주셔서 정말 감사합니다.
다음 버전에서 한글 문자열로 되어있는 코드를 변경하여 해결하겠습니다.
I wonder if I am the only one experiencing an issue where the ‘link’, ‘유의어’, ‘반의어’, and ‘실제 검색어’ cells appear empty when searching for English words. I am not sure whether this is the expected behavior for English word searches or if it is an error caused by my minor modifications to the code in the English message boxes.
I’ll check for cases where the “link,” “유의어,” “반의어,” and “실제 검색어” cells are empty when searching for English words.
If any changes are needed, I’ll fix them in the next version.
Thank you for your feedback.
— Korean
영어 단어를 검색할 때 ‘link’, ‘유의어’, ‘반의어’, ‘실제 검색어’ cell에 빈 값이 나오는 경우를 확인하고, 수정이 필요하면 다음 버전에 반영하겠습니다.
피드백에 감사드립니다.