VBAを初めて使用しています。ドキュメント内のテキストを置き換えるときにテキストを配置し、自動テキストコマンド(F3)を実行できるアプリケーションを作成しようとしています。 私の問題は、カーソルが失われた後です。選択のための有効なコードが存在しないというメッセージが表示されます。誰かが助けてくれますか? 私は、コードの下に使用しています: Sub VbaAutomation()
With
Private Sub Document_Change(ByVal Target As Range)
Set table = ActiveDocument.Tables(1)
If Not Intersect(table, Target) Is Nothing Then
Target.AutoFormat ApplyColor: Red
End If
End Sub
私は次のコードを
ドキュメント内のすべてのテーブルを選択し、行を追加してその行の最初のセルの値を「テキスト」に設定するマクロを作成します。 Sub AddProofRow()
Dim t As Table
For Each t In ActiveDocument.Tables
t.Rows.Add
NewRow = t.Rows.Last
NewRow.Cel
Excel VBAを使用して、Active Word文書で画像の名前を取得する必要があります。 これは私が使用しているコードです: Dim WordApp As Object
Dim DocumentoDestino As Object
Set DocumentoDestino = WordApp.ActiveDocument
MsgBox DocumentoDestino.Shapes(