thedark123
06-05-2006, 10:00 PM
here is my coding and the results displays in this way..
' Initialise all variables for extra feature
Dim tcount As Integer
Dim y As Integer
Dim testid()
Dim rcount()
tcount = ActiveDocument.Tables.Count
y = 0
ReDim testid(tcount)
ReDim rcount(tcount)
For j = 0 To tcount
ActiveDocument.Tables(j).Select
With Selection.Find
.ClearFormatting
.Text = "Test Case ID:"
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Forward = True
Do While .Execute(Forward:=True, Format:=True) = True
With .Parent
testid(j) = ActiveDocument.Tables(j).Cell(1, 2).Range
rcount(j) = ActiveDocument.Tables(j).Rows.Count - 4
End With
Loop
End With
Next j
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
' Type results into table
Selection.TypeText MyName & vbTab & FileLen(MyName) _
& vbTab & FileDateTime(MyName) & vbTab & counter & vbLf & vbLf
' Type results from extra feature into table
For k = 0 To tcount
Selection.TypeText testid(k) & vbTab & rcount(k) & vbLf
Next k
counter = 0
tcounter = 0
Next i
http://i6.photobucket.com/albums/y226/thedark123/oldfile.gif
how to make the display in this manner?
http://i6.photobucket.com/albums/y226/thedark123/newpic.gif
' Initialise all variables for extra feature
Dim tcount As Integer
Dim y As Integer
Dim testid()
Dim rcount()
tcount = ActiveDocument.Tables.Count
y = 0
ReDim testid(tcount)
ReDim rcount(tcount)
For j = 0 To tcount
ActiveDocument.Tables(j).Select
With Selection.Find
.ClearFormatting
.Text = "Test Case ID:"
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Forward = True
Do While .Execute(Forward:=True, Format:=True) = True
With .Parent
testid(j) = ActiveDocument.Tables(j).Cell(1, 2).Range
rcount(j) = ActiveDocument.Tables(j).Rows.Count - 4
End With
Loop
End With
Next j
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
' Type results into table
Selection.TypeText MyName & vbTab & FileLen(MyName) _
& vbTab & FileDateTime(MyName) & vbTab & counter & vbLf & vbLf
' Type results from extra feature into table
For k = 0 To tcount
Selection.TypeText testid(k) & vbTab & rcount(k) & vbLf
Next k
counter = 0
tcounter = 0
Next i
http://i6.photobucket.com/albums/y226/thedark123/oldfile.gif
how to make the display in this manner?
http://i6.photobucket.com/albums/y226/thedark123/newpic.gif