【Word VBA】表データシャッフルマクロ▽ソースコード
Option Explicit
Option Base 0
Public Sub 表データシャッフルマクロ()
Dim Ip As Integer, Jp As Integer, strDat As String
Dim celData As Cell, rngData As Range
Dim strTblDt() As String, intShuDt() As Integer
Dim intShuTp(1) As Integer
If ActiveDocument.Tables.Count < 1 Then Exit Sub
'
With ActiveDocument.Tables(1)
ReDim strTblDt(.Rows.Count - 1, .Columns.Count - 1)
ReDim intShuDt(.Rows.Count - 1, 1)
'
'*セルデータ取り込み
For Each celData In .Range.Cells
strDat = celData.Range.Text
strTblDt(celData.RowIndex - 1, celData.ColumnIndex - 1) = _
Left(strDat, Len(strDat) - 2)
Next celData
0