SyntaxHighlighter

Sunday, June 12, 2011

VSTO: Changes to Zoom percentage not persisted

I have been playing around with VSTO and for some odd reason, my zoom percentage changed to 10% and any subsequent changes to the zoom percentage were not persisted. Using Google's Code Search, I found some examples of how to change these settings in the code-behind:

this.ActiveWindow.View.Type = Word.WdViewType.wdPrintView;
this.ActiveWindow.View.Zoom.Percentage = 100;

But it is still annoying when going into design-mode and having to zoom in again.

One way to fix this is to close Visual Studio, create a copy of the docx file, make the necessary changes and replace the old file.

No comments: