WBURKERT
Technical User
- May 28, 2010
- 73
Here is a short portion of a WORD marco that fails executing the Line Set rngWithData. I have a great understand for programing logic but the syntax is beating me up.
Sub Section_X_to_Word_Table_at_Bookmark_X()
'WORD variables
Dim docDest As Word.Document
Dim Goods As Word.Table
Dim oCell As Word.Cell
Dim s As Long
'EXCEL variables
Dim appXL As Excel.Application
Dim rngWithData As Excel.Range
Dim mySpreadsheet As Excel.Workbook
Dim aryWithData, i As Integer, j As Integer
'row/column counters
Dim RowCount As Long
Dim ColCount As Long
For s = 1 To 5
'****************************************************************************************
'****************************************************************************************
Set appXL = CreateObject("Excel.Application")
Set mySpreadsheet = GetObject("F:\My Documents™\list\LIST.xls")
Set rngWithData = mySpeadsheet.Worksheets("Sec" & s).Range("Print_Area")
Sub Section_X_to_Word_Table_at_Bookmark_X()
'WORD variables
Dim docDest As Word.Document
Dim Goods As Word.Table
Dim oCell As Word.Cell
Dim s As Long
'EXCEL variables
Dim appXL As Excel.Application
Dim rngWithData As Excel.Range
Dim mySpreadsheet As Excel.Workbook
Dim aryWithData, i As Integer, j As Integer
'row/column counters
Dim RowCount As Long
Dim ColCount As Long
For s = 1 To 5
'****************************************************************************************
'****************************************************************************************
Set appXL = CreateObject("Excel.Application")
Set mySpreadsheet = GetObject("F:\My Documents™\list\LIST.xls")
Set rngWithData = mySpeadsheet.Worksheets("Sec" & s).Range("Print_Area")