Sub
Tabelle2er()
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
3, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
With
Selection.Tables(1)
If
.Style <>
"Tabellenraster"
Then
.Style =
"Tabellenraster"
End
If
.ApplyStyleHeadingRows =
True
.ApplyStyleLastRow =
False
.ApplyStyleFirstColumn =
True
.ApplyStyleLastColumn =
False
.ApplyStyleRowBands =
True
.ApplyStyleColumnBands =
False
End
With
Selection.Tables(1).Rows.Alignment = wdAlignRowCenter
Selection.Tables(1).Rows.HeightRule = wdRowHeightExactly
Selection.Tables(1).Rows.Height = CentimetersToPoints(5.4)
Selection.Tables(1).Rows.AllowBreakAcrossPages =
False
Selection.Tables(1).Columns(1).PreferredWidthType = wdPreferredWidthPoints
Selection.Tables(1).Columns(1).PreferredWidth = CentimetersToPoints(7.3)
Selection.Range.Cells(1).VerticalAlignment = wdCellAlignVerticalCenter
Selection.Range.Cells(1).PreferredWidthType = wdPreferredWidthPoints
Selection.Range.Cells(1).PreferredWidth = CentimetersToPoints(7.3)
Selection.MoveRight Unit:=wdCell
Selection.Tables(1).Columns(1).PreferredWidthType = wdPreferredWidthPoints
Selection.Tables(1).Columns(1).PreferredWidth = CentimetersToPoints(1)
Selection.Range.Cells(1).VerticalAlignment = wdCellAlignVerticalCenter
Selection.Range.Cells(1).PreferredWidthType = wdPreferredWidthPoints
Selection.Range.Cells(1).PreferredWidth = CentimetersToPoints(1)
Selection.Borders(wdBorderTop).LineStyle = wdLineStyleNone
Selection.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
Selection.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
Selection.Borders(wdBorderRight).LineStyle = wdLineStyleNone
Selection.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
Selection.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
Selection.MoveLeft Unit:=wdCell
With
Selection.Borders(wdBorderTop)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End
With
With
Selection.Borders(wdBorderLeft)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End
With
With
Selection.Borders(wdBorderBottom)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End
With
With
Selection.Borders(wdBorderRight)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End
With
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.Tables(1).Columns(1).PreferredWidthType = wdPreferredWidthPoints
Selection.Tables(1).Columns(1).PreferredWidth = CentimetersToPoints(7.3)
Selection.Range.Cells(1).VerticalAlignment = wdCellAlignVerticalCenter
Selection.Range.Cells(1).PreferredWidthType = wdPreferredWidthPoints
Selection.Range.Cells(1).PreferredWidth = CentimetersToPoints(7.3)
With
Selection.Borders(wdBorderTop)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End
With
With
Selection.Borders(wdBorderLeft)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End
With
With
Selection.Borders(wdBorderBottom)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End
With
With
Selection.Borders(wdBorderRight)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End
With
With
Selection.Tables(1)
.TopPadding = CentimetersToPoints(0)
.BottomPadding = CentimetersToPoints(0)
.LeftPadding = CentimetersToPoints(0.19)
.RightPadding = CentimetersToPoints(0.19)
.Spacing = 0
.AllowPageBreaks =
True
.AllowAutoFit =
False
End
With
With
Selection.Cells(1)
.WordWrap =
False
.FitText =
False
End
With
Selection.Tables(1).
Select
With
Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(0)
.RightIndent = CentimetersToPoints(0)
.SpaceBefore = 0
.SpaceBeforeAuto =
False
.SpaceAfter = 0
.SpaceAfterAuto =
False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl =
True
.KeepWithNext =
False
.KeepTogether =
False
.PageBreakBefore =
False
.NoLineNumber =
False
.Hyphenation =
True
.FirstLineIndent = CentimetersToPoints(0)
.OutlineLevel = wdOutlineLevelBodyText
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
End
With
End
Sub