For
Each
key
In
Registry
Set
myRange = ActiveDocument.Range(0, 0)
Selection.Tables.Add Range:=myRange, NumRows:=5, NumColumns:=2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:=wdAutoFitFixed
With
ActiveDocument.Tables(1)
Set
rng = .Cell(1, 1).Range
rng.
End
= .Cell(1, 2).Range.
End
rng.
Select
rng.Cells.Merge
Selection.TypeText Text:=
"Connection "
& key
Set
rng2 = .Cell(2, 1).Range
rng2.
Select
Selection.TypeText Text:=
"Name"
Set
rng3 = .Cell(3, 1).Range
rng3.
Select
Selection.TypeText Text:=
"Database Name"
Set
rng4 = .Cell(4, 1).Range
rng4.
Select
Selection.TypeText Text:=
"User Name"
Set
bkm = .Cell(2, 2).Range
bkm.
Select
Selection.Bookmarks.Add (
"Text"
& NameBKM)
Set
bkm2 = .Cell(3, 2).Range
bkm2.
Select
Selection.Bookmarks.Add (
"Text"
& DB_BKM)
Set
bkm3 = .Cell(4, 2).Range
bkm3.
Select
Selection.Bookmarks.Add (
"Text"
& UserBKM)
Selection.GoToNext wdGoToLine
End
With
Next