Thread: [Solved] non-DOC default format
View Single Post
 
Old 07-14-2020, 03:44 PM
melburn melburn is offline Windows 7 32bit Office 97-2003
Novice
 
Join Date: Jul 2019
Posts: 6
melburn is on a distinguished road
Default non-DOC default format

An update on how Paul's assistance led me to a functional macro

Rather than restricting to .txt and .log changed the code for a macro I could apply to any file.

Code:
Sub LandscapeLST9()
'
' LandscapeLST9 Macro
'
Application.ScreenUpdating = False
Dim i As Long
  With ActiveDocument
        .PageSetup.Orientation = wdOrientLandscape
        .PageSetup.TopMargin = CentimetersToPoints(0.6)
        .PageSetup.BottomMargin = CentimetersToPoints(0.6)
        .PageSetup.LeftMargin = CentimetersToPoints(0.6)
        .PageSetup.RightMargin = CentimetersToPoints(0.6)
   End With

  With Selection.Font
   .Name = "Lucida Sans Typewriter"
   .Size = 9

  End With
 Application.ScreenUpdating = True

End Sub

Many thanks Paul
Reply With Quote