下にある [印刷設定] オプションを変更しようとしています。File > Print Setup.
Python で Windows Script Host を使用しています。適切なダイアログ ボックスを開くにはAlt + F、次のように使用します。S

これらのコマンドを手動で実行すると、[印刷設定] ボックスがフォーカスされるので、F[ファイルに出力] を選択する{ENTER}かO、変更を受け入れるために押します。
ただし、ファイルオプションを選択していALT+Fません。F
shell = win32com.client.Dispatch("WScript.Shell")
shell.AppActivate('Point of Sale')
shell.SendKeys("%fs") # I also tried "%fsf and "%fs%f" removing the other call to SendKeys"
time.sleep(0.1) # Removing this (or using a longer wait) makes no difference
shell.SendKeys("F")