none
Open word in Reading Layout RRS feed

  • Question

  • Hi,

    I am opening one word file through c sharp code, but that always open in print view mode,

    How I can set, so when we open the file it open always in Reading layout.

    Please let me know if you like some more information.

    Thanks,

     


    ARUN
    Friday, June 17, 2011 11:36 AM

Answers

  • Hi Arun

    You need a Window object in order to set the View.Type property. This could be the Word.Application.ActiveWindow, it could be Document.ActiveWindow or Document.Windows[index]...

    In your case, since you're probably assigning the document you're opening to a Word.Document object, something like this:

    wordDoc.ActiveWindow.View.Type = Word.

    WdViewType.wdReadingView;

    or

    wordDoc.Windows[1].View.Type = Word.WdViewType.wdReadingView;

    There is no way to set this as the default view for Word or for a document.


    Cindy Meister, VSTO/Word MVP
    Friday, June 17, 2011 12:13 PM
    Moderator

All replies

  • Hi ARUN

    The VBA command is     ActiveWindow.View.Type = wdReadingView


    Kind Regards, Rich ... http://greatcirclelearning.com
    Friday, June 17, 2011 11:56 AM
  • Hi Arun

    You need a Window object in order to set the View.Type property. This could be the Word.Application.ActiveWindow, it could be Document.ActiveWindow or Document.Windows[index]...

    In your case, since you're probably assigning the document you're opening to a Word.Document object, something like this:

    wordDoc.ActiveWindow.View.Type = Word.

    WdViewType.wdReadingView;

    or

    wordDoc.Windows[1].View.Type = Word.WdViewType.wdReadingView;

    There is no way to set this as the default view for Word or for a document.


    Cindy Meister, VSTO/Word MVP
    Friday, June 17, 2011 12:13 PM
    Moderator
  • Hi Cindy Meister,

     

    Thank you so much for your reply, Can this also achieve by doing registry entry or modification?

     

    Thanks


    ARUN
    Friday, June 17, 2011 1:39 PM
  • Hi Arun

    <<Can this also achieve by doing registry entry or modification?>>

    No.

    By default, Word will open a document in the view in which it was closed. But this does not apply to the Reading Layout.


    Cindy Meister, VSTO/Word MVP
    Friday, June 17, 2011 1:52 PM
    Moderator
  • Thank you so much Cindy Meister,
    ARUN
    Friday, June 17, 2011 2:01 PM