Sub 法文ページ設定()
' 法文ページ設定 Macro
' 作成日 平成24年*月*日 作成者 (ユーザー名)
'
Dim WD As String
Dim Res As String
WD = ""
WD = WD & "次のとおり標準設定にしますか。" & vbCr
WD = WD & vbCr & "[ok]ボタンにより,自動設定します。"
WD = WD & vbCr & "----------------------------"
WD = WD & vbCr & "A4判横書き"
WD = WD & vbCr & " 1行37文字 行数26"
WD = WD & vbCr & " フォント MS明朝" & " 12ポイント" & vbCr
WD = WD & vbCr & " 余白 上端35o,下端27o"
WD = WD & vbCr & " 左側30o,右端20o" & vbCr
Res = MsgBox(WD, vbOKCancel, "書式設定")
If Res = vbCancel Then
Exit Sub
End If
With ActiveDocument.Styles(wdStyleNormal).Font
.NameFarEast = "MS 明朝"
.NameAscii = "MS 明朝"
.NameOther = "Century"
.Name = "MS 明朝"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 1
.Animation = wdAnimationNone
.DisableCharacterSpaceGrid = False
.EmphasisMark = wdEmphasisMarkNone
|
End With
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = MillimetersToPoints(35)
.BottomMargin = MillimetersToPoints(27)
.LeftMargin = MillimetersToPoints(30)
.RightMargin = MillimetersToPoints(20)
.Gutter = MillimetersToPoints(0)
.HeaderDistance = MillimetersToPoints(15)
.FooterDistance = MillimetersToPoints(17.5)
.PageWidth = MillimetersToPoints(210)
.PageHeight = MillimetersToPoints(297)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.GutterPos = wdGutterPosLeft
.CharsLine = 37
.LinesPage = 26
.LayoutMode = wdLayoutModeGrid
|
End With
|
End Sub
|