Most comdlg32.ocx errors are related to missing or corrupt comdlg32.ocx files.
The link below contain a list of troubleshooting steps to resolve your comdlg32.ocx problems.
https://www.solvusoft.com/en/files/missing-not-registered/ocx/windows/microsoft/msdn-development-platform-u-s/comdlg32-ocx/
We hope it helps.