none
How to Change the ActiveView.Pane Property From an Outside Window RRS feed

  • Question

  • Hello,

    I've been writing an extensive Mail Merge/Document management add-in.  We're storing pages and revision numbers in a database, and I am currently linking this information to a form that is popped up when the user clicks a ribbon button.  The form is shown non-modally, and shows a grid where the user can save page revision dates and change numbers, and automatically change these values in the header of each page.  The header replacement works fine, however modifying the header switches the document to the headers/footers view.  I try to set Globals.ThisAddIn.Application.ActiveDocument.ActiveWindow.ActivePane.View.Type = WdViewType.wdPrintView from this form, I receive a The property or method is not available on this system error.  I assumed this was caused because the Word window was not currently the active window.  However, I changed this to call from the main ribbon.cs via an event, and I still get this.  Even after I dispose the form and try to set the ActivePane view, this happens.  Any ideas?  It's not a dealbreaker, but just extremely annoying to force the user to change the view back to print view after every change is made.

     

    Thanks,

     

    Chris Saylor

    Washington, DC

    Friday, December 16, 2011 6:52 PM

All replies

  • Hi Chris

    Please show us the code you're using to write information to the header area.


    Cindy Meister, VSTO/Word MVP
    Saturday, December 17, 2011 9:31 AM
    Moderator