0
votes

I know that I can open a Microsoft Word Document in a number of different ways.

Using the ProcessStartInfo class:

ProcessStartInfo processStartInfo = new ProcessStartInfo("winword.exe", filePath);

However, there are only a few command line options that can be used here and I don't believe that opening a Document in Full Screen Reading View is one of them:

Full Screen Reading View

So then we can also use the Microsoft.Office.Interop.Word namespace to open a Word Document:

using Word = Microsoft.Office.Interop.Word;
...
Word.Application wordApplication = new Word.Application();
wordApplication.Documents.Open(path);
wordApplication.Visible = true;

We can also open a Word Document using this method, but with far more options:

Word.Application wordApplication = new Word.Application();
wordApplication.Documents.Open(path, Type.Missing, true, Type.Missing, Type.Missing, 
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
wordApplication.Visible = true;

The above example will open the Document in Read only mode. But these options don't seem to provide the possibility of opening the Document in different Views:

enter image description here

So... as the title says, does anyone know how to open a Microsoft Word Document in Full Screen Reading View?

1

1 Answers

1
votes

Try this:

wordApplication.ActiveWindow.View.ReadingLayout = true;

FYI - I figured it out by recording a macro in Word that switched to that mode.

BTW - It seems to behave a little different based on the value of wordApplication.Visible. If Visible is already true, then it works like it does in Word itself. If Visible is set to true later, it still goes into full screen but the title bar/toolbar is missing and pressing esc puts it into another weird window without toolbars.

So, I guess you need to make sure it is visible before setting the above.

I'm using Office 2010.