none
A Question About the View Object For the Word Experts RRS feed

  • Question

  • Hi again Word gods!  I have a problem with getting various View object properties in that the screen flashes (the window repaints itself) in Word 2007 when you're 'getting' these properties while in a bulleted/numbered lists or Table Of Contents.  These properties are such things as "ShowParagraphs", "ShowSpaces", "ShowTabs", and "ShowAll". 

    Is there any alternatives for getting these properties or getting some sort of hint that any of the "Show" properties of the View object have changed without the screen flashing? 

    The bigger question is why Word finds it necessary to go through this huge stupid algorithm which flashes the screen and takes over 100 ms to perform?  Even though the screen doesn't flash in Word 2010, it still takes over 100ms to get each of these properties! Aren't these properties just boolean variables that they can read from their Window instance data?  


    Fred
    • Edited by FEINSTEI Tuesday, December 21, 2010 1:44 PM list->lists
    Tuesday, December 21, 2010 1:43 PM

All replies

  • Hi Fred

    Mmmm, I just did a quick test in VBA and I don't get any flashes. I know you're using a language we don't understand very well :-), but could you show us as simple a version of your C code as possible that's doing this?

    Is there anything else we should know for repro'ing, besides the cursor being in a bulleted list or a TOC?


    Cindy Meister, VSTO/Word MVP
    Tuesday, December 21, 2010 7:04 PM
    Moderator
  • Hi Cindy,

    Thanks for looking at this.  I am doing more analysis and will report back when I'm done.  Basically, I'm getting the View object from the ActiveWindow object.  I then use the View object to GetShowSpaces, GetShowTabs, GetShowAll, and GetShowParagraphs.  I have tried this both with Early and Late binding.  I get screen flashing when I'm inside of a numbered list and and I place my cursor right on top of the number itself. I've noticed some inconsistant behavior based on whether you derive the ActiveWindow object from the Application object versus deriving it from the CurrentDocument object.  Again, I need to test this some more tomorrow to confirm these inconsistancies.  Thanks again for responding Cindy!  You're a "goddess"!


    Fred
    Wednesday, December 22, 2010 12:45 AM