US letter using a Word template?

G

Guest

How do I auto-format page setup to US Letter using a Word template?
I want to be able to attach a template to my documents that will change the
page setup from A4 to Letter without me having to go and do this via the page
setup dialog for each document.
 
G

Guest

Hi anne, thanks for your quick reply!
Can I get the macro to autorun when the template is attached?
Thanks again :blush:)
 
H

Herb Tyson [MVP]

You'd probably want an AutoOpen macro. An AutoOpen macro runs when a
document is opened. The macro would first test to see if the page setup has
already been done, and if not, then make the change. There are a variety of
ways to do this. You might post in one of the VBA groups for additional help
if you hit any stumbling blocks.

Cheers,
 
A

Anne Troy

I don't think that attaching a template is an event in Word. I'd be inclined
to think this is a question to be asked in the
microsoft.public.word.vba.general newsgroup while you're at it.
************
Anne Troy
www.OfficeArticles.com
 
G

Graham Mayor

If all you want to do is change the page size of your documents without
using the page setup, then open the document and run the following macro:


Sub USLetterPage()
With ActiveDocument.PageSetup
.PageWidth = CentimetersToPoints(21.59)
.PageHeight = CentimetersToPoints(27.94)
End With
End Sub

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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