Instead of "MsgBox Pwd(8), try:
Code:
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2, NumColumns:= _
1, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = False
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = False
.ApplyStyleRowBands = True
.ApplyStyleColumnBands = False
End With
Selection.TypeText Text:="Password"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:=Pwd(8)