79567609

Date: 2025-04-10 21:34:27
Score: 0.5
Natty:
Report link

Office 2016 (x32) saved the last width just fine. But Office 2021 (x64) always sets it to 200.

Thanks to rominator007's idea, I did the following:

var taskPane = wordDocument.CommandBars["Task Pane"];
if (taskPane != null && taskPane.Width < 250)
{
  // You need to first touch the Position to be able to set the Width.
  var pos = taskPane.Position;
  taskPane.Position = pos;
  taskPane.Width = 250;
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Herb F