Results 1 to 13 of 13

Thread: Automatic zoom

  1. #1
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Automatic zoom

    Hi all,
    I have been asked by someone who is visually handicapped whether there is a way to have Word automatically change the view size to 150% when a document (or email as it is his email editor) opens. Since you could write everything I know about Word on the head of a pin, can anyone out there help?
    Thanks.
    PS I'm assuming that this is a setting that is particular to each document so code would be needed? (in an ideal world it would be automatic rather than require user intervention)
    Regards,
    Rory

    Microsoft MVP - Excel

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic zoom

    Rory,

    Visually handicapped? Visually impaired maybe, handicapped, no. Hey, we must be politically correct.

    Try the following in their "Autonew" (or "AutoOpen") in their normal.dot:

    ActiveWindow.ActivePane.View.Zoom.Percentage = 150

    Of course, this leads to all sorts of problems with using normal.dot. That's too big to look at right now!
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Automatic zoom

    Geoff,
    Thanks! That looks like it will do the trick.
    Incidentally, handicapped was his word in the message to me (though it's what I'd use anyway as I've never believed in being PC.)
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Automatic zoom

    Geoff,
    That code works perfectly for opening documents but doesn't seem to get triggered when Word opens its 'default' document at startup. Any thoughts?
    Also, it has no effect when editing emails from Outlook. Is there anything simple to fix that or do I have to start coding Outlook itself?[img]/w3timages/icons/sad.gif[/img]
    Thanks.
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    chris_k
    Guest

    Re: Automatic zoom

    Rory, since the "default" document is based on Normal.dot, if they open their Normal.dot and change their "Zoom" to 150% then resave the template, any "blank" or "new" document thereafter should open at 150%. AS far as getting that same view in Outlook, I have no idea.

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Automatic zoom

    Thanks Christine! Unfortunately I found that opening another document (even though it got resized) seemed to reset the default one to 100%. I will investigate further though.
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Automatic zoom

    Rory,

    It sounds as if you put in the AutoOpen macro but not the AutoNew.

    You could do the following:
    Sub AutoNew()
    AutoOpen
    End Sub

    This should handle the startup blank document.
    Charles Kyle Kenyon
    Madison, Wisconsin

  8. #8
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Automatic zoom

    Chas,
    I've actually put both of them in. I've also tried adding messageboxes and debug.print to the autonew code but it doesn't seem to trigger with the 'default' document. It does work with any new documents created thereafter, just not that first one.
    Any suggestions?
    Regards,
    Rory

    Microsoft MVP - Excel

  9. #9
    Lounger
    Join Date
    Jan 2001
    Location
    new orleans, louisiana
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic zoom

    great question-my daughter is development director for Reading Radio for the Blind in New Orleans. i'm going to forward this to her for inclusion in their next newsletter-you've helped more people than just your one friend!

  10. #10
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Automatic zoom

    Got it! (sort of)

    Sub AutoExec()
    On Error Resume Next
    Documents.Add
    On Error GoTo 0
    End Sub

    Don't know why, but this slows things down enough for the AutoNew macro to catch up. Still only one new document opened. Side-effect, though, is Word will open a new document even if there is already another document open.

    The following was my test AutoNew:
    Sub AutoNew()
    MsgBox "New File."
    End Sub
    Charles Kyle Kenyon
    Madison, Wisconsin

  11. #11
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Automatic zoom

    As another variation on the theme, you might try:

    Sub AutoExec()
    Dim Doc As Document
    For Each Doc In Documents
    ActiveWindow.ActivePane.View.Zoom.Percentage = 150
    Next Doc
    End Sub

    (Can't test this one at the moment, though...)

  12. #12
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Automatic zoom

    Chas,
    Thanks - that's fantastic![img]/w3timages/icons/grin.gif[/img]
    I would guess that it works because you are specifically opening a new doc, so it triggers the AutoNew code. Seems to work with Outlook too so it's doubly brilliant!
    However, and this may just be me - I'll have to test it at home - using Word as Outlook's email editor seems to leave a Winword process running even after closing the email. Which of course means that if you then 'open' Word, it simply makes the existing process visible, doesn't trigger the autoexec and the view remains at 100%.[img]/w3timages/icons/scream.gif[/img] (I'm running Office2k on WinNT4 SP6a)
    Still, it's a giant leap forward for which I thank you profusely!![img]/w3timages/icons/clever.gif[/img][img]/w3timages/icons/king.gif[/img]
    Regards,
    Rory

    Microsoft MVP - Excel

  13. #13
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Automatic zoom

    Gary,
    It's a good thought, but I get the impression that the autoexec triggers before any docs are loaded and so it doesn't work (at least it didn't when I tried it).
    Chas' post gets me to an almost perfect situation apart from using Word as the email editor for Outlook - details in my reply to him above.
    I'd appreciate any input you may have!
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •