2,462
社区成员
发帖
与我相关
我的任务
分享
Sub 宏1()
Dim StrAddr As String
' This macro displays the address of a table's selected cell range
' and the table’s last cell address on Word's Status Bar
With Selection
If .Information(wdWithInTable) = True Then
StrAddr = "The selected "
If .Cells.Count = 1 Then
StrAddr = "T" & Selection.Tables(1).Range.Start & "R" & .Cells(1).RowIndex & "C" & .Cells(1).ColumnIndex
Else
StrAddr = "No Table Or More Tables "
End If
End If
End With
Call CopyToClipbox(StrAddr)
MsgBox StrAddr
End Sub
Selection.Tables(1).ID = "Test1"
For Each tabl In ActiveDocument.Tables
If tabl.ID = "Test1" Then tabl.Borders.OutsideLineWidth = wdLineWidth225pt
Next
ActiveWorkbook ' 返回“当前活动工作簿”
ActiveSheet ' 返回“(当前活动工作簿的)活动工作表”
ActiveCell ' 返回“(当前活动工作表的)活动单元格”