Hi guys,
I need some help. I'm running some macros from a master workbook and generating a Word document with the data taken from my Excel file.
This Word document is saved in one of my "D" drive using the values from Cells(2,2) of my master Excel workbook.
So after my Word document is created and saved, I want to be able to, using VBA, edit a table that is within this Word document that I created (I have attached a sample of the Word document for practical purposes).
I want to delete all rows of the table where the first column value starts with "[[". The table looks like this:
Word Table.jpg
My limited VBA knowledge has taken me to the following code, but this is only the beginning, I don't know where to go from here, any help is appreciated.
Sub FnEditAndSaveWordDoc()
Dim objWord
Dim objDoc
Dim objSelection
Dim objTable
Dim objRange
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("D:\Users\DMol\Desktop\Client\Clients" & "\" & Cells(2, 2) & "\" & Cells(2, 2) & "_2017 Proposal.docx")
objWord.Visible = True
Set objSelection = objWord.Selection
Set objTable = objDoc.Tables(1)
'NEED HELP HERE......
objDoc.Save
End Sub
Thank you in advance for any help provided.
Bookmarks