|
Visual Basic (VB and VBA) |
|
Copyright 1999-2001 Christopher Greaves. All rights reserved. Home Page and email to [email protected] |
| If in doubt, record a macro and inspect the entrails! |
Please read the DISCLAIMER.
Here is an INDEX to all the procedures.
You will probably need one copy of my GLOBAL DECLARATIONS.
Public Function LoadTwoColumnTable(strIk() As String)
' Build a two-column concordance table in the active document at the current selection point.
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:=2
Dim strWord As String
Dim i As Integer
For i = 0 To UBound(strIk)
strWord = strSplitStringAt(strIk(i), strcArrayDelimiter, True)
Selection.TypeText Text:=strWord
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:=strWord
Selection.MoveRight Unit:=wdCell
Next i
Selection.SelectRow
Selection.Rows.Delete
'Sub TESTLoadTwoColumnTable()
'Dim strIW(1, 3) As String
'strIW(0, 0) = "a"
'strIW(0, 1) = "b"
'strIW(0, 2) = "c"
'strIW(0, 3) = "d"
'strIW(1, 0) = "e"
'strIW(1, 1) = "f"
'strIW(1, 2) = "g"
'strIW(1, 3) = "h"
'Call LoadTwoColumnTable(strIW)
'End Sub
End Function
| We all knew nothing when we started … |
|
Home Page and Contact Information Send email to [email protected]. This page was last updated Thursday, November 15, 2001 |