Learn when you want, where you want with convenient online training courses. Sign up now!
[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.
Dim wrdTbl As Table
Dim RowCount As Long, ColCount As Long, i As Long, j As Long
'~~> Excel Objects
Dim oXLApp As Object, oXLwb As Object, oXLws As Object
'~~> Set your table
Set wrdTbl = Selection.Tables(1)
'~~> Get the word table Row and Column Counts
ColCount = wrdTbl.Columns.Count
RowCount = wrdTbl.Rows.Count
'~~> Create a new Excel Applicaiton
Set oXLApp = CreateObject("Excel.Application")
'~~> Hide Excel
oXLApp.Visible = False
'~~> Open the relevant Excel file
Set oXLwb = oXLApp.Workbooks.Open("C:\Sample.xls")
'~~> Work with Sheet1. Change as applicable
Set oXLws = oXLwb.Sheets(1)
'~~> Loop through each row of the table
For i = 1 To RowCount
'~~> Loop through each cell of the row
For j = 1 To ColCount
'~~> This gives you the cell contents
Debug.Print wrdTbl.Cell(i, j).Range.Text
'~~> Put your code here to export the values of the Word Table
'~~> cell to Excel Cell. Use the .Range.Text to get the value
'~~> of that table cell as shown above and then simply put that
'~~> in the Excel Cell
' .Cells(1, 1).Value = wrdTbl.Cell(i, j).Range.Text
'~~> Close and save Excel File
'~~> Cleanup (VERY IMPROTANT)
Set oXLws = Nothing
Set oXLwb = Nothing
Set oXLApp = Nothing
Open in new window
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.