使用如下代碼進行測試:
DATA: lv_string TYPE string VALUE 'thia is a text'.
CALL FUNCTION 'LXE_SP_CHECKSPELLING_MS'
EXPORTING
isolanguage = 'EN'
CHANGING
buffer = lv_string.
WRITE: / lv_string.
[外鍊圖檔轉存失敗(img-CrX9VVCq-1562210632459)(https://user-images.githubusercontent.com/5669954/27283800-4c7e9318-54f6-11e7-9789-2305736060bf.png)]
利用OLE建立word application:
[外鍊圖檔轉存失敗(img-rdEdNTMZ-1562210632460)(https://user-images.githubusercontent.com/5669954/27283840-7d359df8-54f6-11e7-9b23-df13965da723.png)]
彈出word界面:
[外鍊圖檔轉存失敗(img-Xr2101Di-1562210632460)(https://user-images.githubusercontent.com/5669954/27283803-4c940090-54f6-11e7-8864-dcf767b6dd8b.png)]
點change button:
report輸出:
用process monitor能觀察到word application以/Automation -Embedding的方式在背景啟動: