![]() |
|
|
|
#1
|
|||
|
|||
|
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)
|
|
#2
|
|||
|
|||
|
Thank you DW. I will try to make time later today and try your code and will post back to let you know how I make out.
Regards, |
|
#3
|
|||
|
|||
|
Hi DW,
I have finally found a minute to try the code you suggested and I have developed a compile error. "Invalid outside Procedure". Do you have any suggestions? |
|
| Tags |
| msg box, table, vba in microsoft word |
|
|