Can anyone tell me why i am getting The requestedmember of the
Collection Does not exist.Runtime error '5941'.Any help would be
Greately appreciated.Cursor go on the bold line.
Sub CreateMaterialsTable()
ActiveDocument.Tables.Add Range:=Selection.Range, Numrows:=3, NumColumns:= _
4, defaulttablebehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
ActiveDocument.Tables(3).Select
'selection is Application.selection object
With ActiveDocument.Tables(3)
If .Style <> "tabellengitternetz" Then
.Style = "Tabellengitternetz"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With
ActiveDocument.Tables(3).Rows.HeightRule = wdRowHeightExactly
ActiveDocument.Tables(3).Rows.Height = CentimetersToPoints(0.7)
ActiveDocument.Tables(3).Columns(1).PreferredWidthType = wdPreferredWidthPercent
ActiveDocument.Tables(3).Columns(1).PreferredWidth = 8
ActiveDocument.Tables(3).Columns(2).PreferredWidthType = wdPreferredWidthPercent
ActiveDocument.Tables(3).Columns(2).PreferredWidth = 68
ActiveDocument.Tables(3).Columns(3).PreferredWidthType = wdPreferredWidthPercent
ActiveDocument.Tables(3).Columns(3).PreferredWidth = 12
ActiveDocument.Tables(3).Select
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter
Selection.Font.Size = 8
Selection.Font.Name = "Arial"
CreateHeader
End Sub