Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Back to Microsoft Word Forum    Comments List
Word Template Upload Images   Link   Email  
Chris Bezant        
4 months ago

I am partially sighted but still use the computer a lot.
I have set up my own  template to suit my sight but need a little help.
I want the template to maximise Word and set the view to page width.
I recorded some vba macros but have failed to find the right spot to put them.
Any help much appreciated.
Alex Hedley             
4 months ago
As in an On Open event?
Kevin Yip       
4 months ago
You need some VBA code to do this whenever the document opens.  But you can't use a template for that purpose because when you create a new document based on the template, the VBA code on that template does not carry over to the new document.  So you have to store the VBA code in the document itself, and a macro-enabled document to boot (.docm, not .docx).

You need to add an AutoOpen() procedure if you need VBA code to run automatically when the document opens.  Put this code in a .docm file's VBA editor, and the document will open maximized with page width view set:

Sub AutoOpen()
    ' Maximize window
    ActiveDocument.ActiveWindow.WindowState = wdWindowStateMaximize

    ' Set view to page width
    ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitBestFit
End Sub
Chris Bezant        
4 months ago
Thanks Kevin that explains why my template didn't work

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Microsoft Word Forum.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/25/2024 8:02:24 AM. PLT: 0s