1
すべてのスライドをループしてテーブル内のテキストを黒に変更するマクロが必要です。以下のコードを試してみると、エラーメッセージ:Method 'Table' of 'Shape' failed
が表示されます。テキストテーブルを変更するコードすべてのスライド内の色
これは私のコードです:
Sub TableAllBlack()
Dim lRaw As Integer
Dim lCol As Integer
Dim oTbl As Table
Dim osld As Slide
Dim oShp As Shape
With ActivePresentation
For Each oSl In .Slides
For Each oSh In oSl.Shapes
Set oTbl = oSh.Table
With oTbl
For lRow = 1 To .Rows.Count
For lCol = 1 To .Columns.Count
With .Cell(lRow, lCol).Shape
If .HasTextFrame Then
If .TextFrame.HasText Then
TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End If
End If
End With
Next
Next
End With
Next
Next
End With
End Sub
がypur答えてくれてありがとう
Set oTbl = oSh.Table
行の前にそれを直接置きます!私はまだ行に1つの間違いがあります:TextFrame.TextRange.Font.Color.RGB = RGB(0、0、0)。それは常にオブジェクトが必要です!私は何をすべきか? Thanks – Zigouma@Zigouma TextFrameの前に期間を追加する – RGA