MSWord closes unexpectedly when clicking "Print" button in "Envelopes and Labels" dialog

Prasanth Vimalanathan 0 Reputation points
2024-07-19T12:06:41.3133333+00:00

I'm embedding MSWord in my WinForms app using Microsoft Library, and I'm following this guideline to set the window style to ws_child to support the child window. However, when I click the "Print" button in the "Envelopes and Labels" dialog, MSWord unexpectedly closes. The issue is resolved when I remove the style setting or set it to ws_popup, but using ws_popup goes against the guideline. Can anyone guide me on how to resolve this issue while following the guidelines?

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,068 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,512 questions
0 comments No comments
{count} votes