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 / Programming / April 2007

Tip: Looking for answers? Try searching our database.

Letterhead Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Phillips - 29 Apr 2007 17:46 GMT
Hello,

Below is the macro I made to set the printer to print on letterhead. Here
are the settings I want:

Page Setup to [Tab] Paper:

1.       Paper size: 8.5X11" Letter

2.       Paper source

a.       First page: Tray 1

b.       Other pages: Automatically Select

Print Properties:

           1. Paper/Output: 8.5X11" Letter, White, Letterhead

The actual macro named Letterhead is below:

Sub Letterhead()

'

' Letterhead Macro

' To Print to Letterhead

'

   With ActiveDocument.Styles(wdStyleNormal).Font

       If .NameFarEast = .NameAscii Then

           .NameAscii = ""

       End If

       .NameFarEast = ""

   End With

   With ActiveDocument.PageSetup

       .LineNumbering.Active = False

       .Orientation = wdOrientPortrait

       .TopMargin = InchesToPoints(1)

       .BottomMargin = InchesToPoints(1)

       .LeftMargin = InchesToPoints(1)

       .RightMargin = InchesToPoints(1)

       .Gutter = InchesToPoints(0)

       .HeaderDistance = InchesToPoints(0.5)

       .FooterDistance = InchesToPoints(0.5)

       .PageWidth = InchesToPoints(8.5)

       .PageHeight = InchesToPoints(11)

       .FirstPageTray = 259

       .OtherPagesTray = wdPrinterFormSource

       .SectionStart = wdSectionNewPage

       .OddAndEvenPagesHeaderFooter = False

       .DifferentFirstPageHeaderFooter = False

       .VerticalAlignment = wdAlignVerticalTop

       .SuppressEndnotes = False

       .MirrorMargins = False

       .TwoPagesOnOne = False

       .BookFoldPrinting = False

       .BookFoldRevPrinting = False

       .BookFoldPrintingSheets = 1

       .GutterPos = wdGutterPosLeft

   End With

End Sub

Can/will someone show me a better way to do this???

Thank you,

Charles L. Phillips
Graham Mayor - 30 Apr 2007 07:13 GMT
I wouldn't use a macro for this.Set up the requirements in the document
template and use the template to create your letterhead documents. Note that
this may only work for the currently installed printer. Change the printer
and you will probably have to change the template and/or macro.

You could also consider a print macro -

Sub PrintLHead()
Dim sTray As String
sTray = Options.DefaultTray 'Save the current tray
Options.DefaultTray = "Tray 1" 'set Page 1 to Tray 1
ActiveDocument.PrintOut Pages:="1"
Options.DefaultTray = "Tray 2" ' set the rest to Tray 2
ActiveDocument.PrintOut Pages:="2-999"
Options.DefaultTray = sTray 'Put the tray back as it was at the start
End Sub

See http://www.gmayor.com/fax_from_word.htm

Signature

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

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

> Hello,
>
[quoted text clipped - 98 lines]
>
> Charles L. Phillips

Rate this thread:






 
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



©2008 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.