안녕하세요.
아래 코드는 모두 바꾸기(빈 칸 2개 → 빈 칸 1개) 매크로 코드입니다.
function OnScriptMacro_script12()
{
HAction.GetDefault("AllReplace", HParameterSet.HFindReplace.HSet);
with (HParameterSet.HFindReplace)
{
MatchCase = 0;
AllWordForms = 0;
SeveralWords = 0;
UseWildCards = 0;
WholeWordOnly = 0;
AutoSpell = 1;
Direction = FindDir("AllDoc");
IgnoreFindString = 0;
IgnoreReplaceString = 0;
FindString = " ";
ReplaceString = " ";
ReplaceMode = 1;
IgnoreMessage = 1;
HanjaFromHangul = 0;
FindJaso = 0;
FindRegExp = 0;
FindTextInPicture = 0;
FindStyle = "";
ReplaceStyle = "";
FindType = 1;
}
XHwpMessageBox.String = HAction.Execute("AllReplace", HParameterSet.HFindReplace.HSet);
XHwpMessageBox.DoModal();
}
실행해 보니 첨부 사진과 같이 캐럿이 있는 위치에 따라 결과가 다르게 나옵니다.
이유가 궁금합니다. 수고하세요.
