How to customize Word without disturbing user's Word environment?

J

Joseph Geretz

My application uses Word automation to display a Word document. For the
display of this particular document, I'd like to remove all toolbars in
order to display as much of the document as possible, with the available
screen real-estate. How do I do this without disturbing the user's regular
Word environment?

Thanks,

- Joe Geretz -
 
H

Helmut Weber

Hi Joe,

ActiveWindow.View.FullScreen = True

or is there something I don't see?

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 
J

Joseph Geretz

Hi Helmut,

Thanks for the tip. That actually looks pretty good! Just one detail, is it
possible to provide the user with scrollbars in this view?

Thanks,

- Joe Geretz -
 
H

Helmut Weber

Hi Joseph,
like:

With ActiveWindow
.View.FullScreen = True
.DisplayVerticalScrollBar = True
End With

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
J

Joseph Geretz

Thanks Helmut, this is working out really nicely!

One more request, since I'm progrmamatically controlling the display of the
document, and I don't want the user to be able to exit full screen mode, is
it possible to hide the floating Full Screen toolbar? I've tried to hide
this using WinAPI, but for some reason, this window won't disappear. (I
tried to move it off-screen, but it won't move either.)

Thanks for your help!

- Joe Geretz -
 
J

Joseph Geretz

Sorry, my mistake. I can make this invisible as well, however certain API
control of the full screen view window, causes the toolbar to reappear as a
side effect. So I simply need to reset it to invisible at the appropriate
point.

- Joe Geretz -
 
H

Helmut Weber

Hi Joe,

how about adding something like this:

Application.CommandBars("Full Screen").Visible = False

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 
H

Helmut Weber

....
in addition, you might find this useful:

Sub Makro4()
Dim i As Integer
For i = 1 To Application.CommandBars.Count
With Selection
.TypeText Text:=Format(i, "000 ")
.TypeText Text:=Application.CommandBars(i).Name
.TypeText Text:=vbCr
End With
Next
End Sub

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 
J

Jean-Guy Marcil

Joseph Geretz was telling us:
Joseph Geretz nous racontait que :
Thanks Helmut, this is working out really nicely!

One more request, since I'm progrmamatically controlling the display
of the document, and I don't want the user to be able to exit full
screen mode, is it possible to hide the floating Full Screen toolbar?
I've tried to hide this using WinAPI, but for some reason, this
window won't disappear. (I tried to move it off-screen, but it won't
move either.)

Can't the user just hit the Escape key to leave the Full Screen mode (even
if the toolbar is hidden)?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Joseph Geretz

Oops. Yes they can.

Is there any way I can disable this? Or is there an event I can receive when
this happens so that I can reset the view to Full Screen?

Thanks,

- Joe Geretz -
 
J

Joseph Geretz

Hi Helmut,
Application.CommandBars("Full Screen").Visible = False

This works but I'm finding that if the window loses and then receive focus
again, the toolbar reappears. So I've shifted it off the screen.

Thanks,

- Joe Geretz -
 
J

Jean-Guy Marcil

Joseph Geretz was telling us:
Joseph Geretz nous racontait que :
Oops. Yes they can.

Is there any way I can disable this? Or is there an event I can
receive when this happens so that I can reset the view to Full Screen?

If I remember correctly, monitoring the Escape key can be problematic.

It seems to me that you are doing a lot of work for a strange reason.
If I can see the document in Full Screen, I can also edit it. Why prevent
me, the user who knows Word and is not bothered by cluttered space (In fact
I need my 12 toolbars!), from going back to normal/print layout view? It
should be my decision, no?

If there is a particular reason, once you have explained it, you might find
that there is an easier way to achieve the same ends...

Just my 2 cents!
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top