![]() |
|
#1
|
|||
|
|||
|
Hi, I have multiple tables within a Word document. Below is my working Excel VBA code. How do I convert it to Word for a table name "Table_Implemented"? Also, since I use the Power Automate "Populate a Word Document", is there a way to run the macro automatically once the document is created?
Thanks for any insight!!! Code:
Sub deleteRow()
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Application.ScreenUpdating = False
'declare variables
Dim deleteRow As Long
Dim ws As Worksheet
'set objects
Set ws = ActiveSheet
For deleteRow = ws.Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
If ws.Range("A" & deleteRow).Value = "Not Implemented" Then
Rows(deleteRow).EntireRow.Delete
End If
Next deleteRow
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
Last edited by macropod; 04-13-2021 at 09:37 PM. Reason: Added code tags |
| Tags |
| vba |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro to insert multiple photos into separate tables | Photoinserts | Word VBA | 0 | 11-12-2018 08:30 PM |
replacing multiple ranges in excel with tables in word from top to bottom
|
modiria50989 | Word VBA | 5 | 09-13-2017 04:01 PM |
Creating multiple tables VBA from Excel to Word
|
francesco | Word VBA | 1 | 01-07-2016 04:08 AM |
Copying Multiple tables from excel into a single word document
|
dineshtgs | Word Tables | 1 | 04-07-2011 01:27 AM |
working with excel tables in MS word
|
radman154 | Word Tables | 1 | 03-25-2011 12:04 AM |