한글 2022 문서 끼워넣기

Python으로 문서 끼워넣기를 하고 있는데
제가 만든 소스로 한글 2020에서는 정상 작동되는 것을 확인했습니다.

하지만 한글 2022에서는 정상 작동 되지 않고 아무 반응이 없습니다.
한글 2022의 문서 끼워넣기 버그인건가요? 아니면 소스가 바뀐건가요?

소스는 아래와 같습니다.

hwp.HAction.GetDefault(“InsertFile”, hwp.HParameterSet.HInsertFile.HSet)
option=hwp.HParameterSet.HInsertFile
option.filename = fileName
option.KeepSection = 1
option.KeepCharshape = 1
option.KeepParashape = 1
option.KeepStyle = 1
hwp.HAction.Execute(“InsertFile”, hwp.HParameterSet.HInsertFile.HSet)

2개의 좋아요

안녕하세요 ^^
12.0.0.3437 버전에서 확인해보았으나 저는 정상 동작하고있습니다.
해당 부분 변경부분은 없습니다 ~!

혹시 레지스트리 등록이 정상적으로 되어있지 않을수있으니 2022의 "한컴 기본 설정"을 실행뒤 기본값으로 설정을 한뒤 컴퓨터 재부팅후 테스트 부탁드립니다.
감사합니다 ^^

3개의 좋아요

저도 2022에서 테스트해보니 잘 되는군요.
아직 실행이 되지 않고 있는 상태시라면,
아래와 같이 실행해보시기 바랍니다.
(option을 먼저 정의하시고, GetDefault와 Execute에 option을 써주세요…)

option = hwp.HParameterSet.HInsertFile
hwp.HAction.GetDefault("InsertFile", option.HSet)
option.filename = fileName
option.KeepSection = 1
option.KeepCharshape = 1
option.KeepParashape = 1
option.KeepStyle = 1
hwp.HAction.Execute("InsertFile", option.HSet)
1개의 좋아요

한글 2022 업데이트 하고 해보니 잘 됩니다.
감사합니다!

1개의 좋아요