Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Menus and Toolbars / April 2007

Tip: Looking for answers? Try searching our database.

how to define what happens when exiting Full-Screen Mode

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank Spade - 04 Apr 2007 14:35 GMT
Hello,

I wrote a macro which enters into full-screen mode when I do certain
formatting.

I now like to define the view word goes into (page width) after I exit
full-screen mode. Preferably I like to hook that macro to the virtual button
that shows after entering full-screen mode.

How would I do that in Word 2003?

Kind regards,

Frank
Klaus Linke - 09 Apr 2007 04:30 GMT
Hi Frank,

The built-in command that runs both when you enter and exit full screen mode
is called ToggleFull.
You could hijack it and add your own code:

Sub ToggleFull()
  MsgBox "ToggleFull"
  WordBasic.ToggleFull
  If ActiveDocument.ActiveWindow.ActivePane.View.FullScreen Then
     MsgBox "Add code to run when entering full screen mode here"
  Else
     MsgBox "Add code to run when eciting full screen mode here"
  End If
End Sub

Regards,
Klaus

> Hello,
>
[quoted text clipped - 10 lines]
>
> Frank
Graham Mayor - 09 Apr 2007 07:55 GMT
WordBasic?
How about

Sub ToggleFull()
  MsgBox "ToggleFull"
  ActiveWindow.View.FullScreen = Not ActiveWindow.View.FullScreen
  If ActiveWindow.View.FullScreen Then
     MsgBox "Add code to run when entering full screen mode here"
  Else
     MsgBox "Add code to run when exiting full screen mode here"
  End If
End Sub

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Hi Frank,
>
[quoted text clipped - 29 lines]
>>
>> Frank
Klaus Linke - 09 Apr 2007 11:47 GMT
Hi Graham,

Don't knock WordBasic <g>

It's just the code Word runs if you use any control in the user interface.
So IMHO, it's much easier to run the code Word would run anyway, when you
hijack any control, than to try to mimick it with VBA.
I've very often seen the macro recorder recording different code for some
control, depending on the current selection, the view, option settings, and
so on. Or the macro recorder missed stuff the control did.

Regards,
Klaus

> WordBasic?
> How about
[quoted text clipped - 42 lines]
>>>
>>> Frank
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.